mirror of
https://github.com/knex/knex.git
synced 2025-11-11 15:23:57 +00:00
19 lines
507 B
JavaScript
19 lines
507 B
JavaScript
/* eslint max-len: 0 */
|
|
|
|
const TableCompiler = require('../postgres/schema/pg-tablecompiler');
|
|
|
|
class TableCompiler_CRDB extends TableCompiler {
|
|
constructor(client, tableBuilder) {
|
|
super(client, tableBuilder);
|
|
}
|
|
|
|
dropUnique(columns, indexName) {
|
|
indexName = indexName
|
|
? this.formatter.wrap(indexName)
|
|
: this._indexCommand('unique', this.tableNameRaw, columns);
|
|
this.pushQuery(`drop index ${this.tableName()}@${indexName} cascade `);
|
|
}
|
|
}
|
|
|
|
module.exports = TableCompiler_CRDB;
|