mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 19:56:00 +00:00
clickhouse: edit table options
This commit is contained in:
@@ -294,12 +294,25 @@ export class SqlDumper implements AlterProcessor {
|
||||
});
|
||||
|
||||
this.put('&<&n)');
|
||||
|
||||
this.tableOptions(table);
|
||||
|
||||
this.endCommand();
|
||||
(table.indexes || []).forEach(ix => {
|
||||
this.createIndex(ix);
|
||||
});
|
||||
}
|
||||
|
||||
tableOptions(table: TableInfo) {
|
||||
const options = this.driver.getTableFormOptions('sqlCreateTable');
|
||||
for (const option of options) {
|
||||
if (table[option.name]) {
|
||||
this.put('&n');
|
||||
this.put(option.sqlFormatString, table[option.name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
createTablePrimaryKeyCore(table: TableInfo) {
|
||||
if (table.primaryKey) {
|
||||
this.put(',&n');
|
||||
|
||||
Reference in New Issue
Block a user