mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 21:56:00 +00:00
alter processor fixes
This commit is contained in:
@@ -41,7 +41,7 @@ class Dumper extends SqlDumper {
|
||||
dropTable(obj, options = {}) {
|
||||
this.put('^drop ^table');
|
||||
if (options.testIfExists) this.put(' ^if ^exists');
|
||||
this.put(' %f', obj.FullName);
|
||||
this.put(' %f', obj);
|
||||
this.endCommand();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ const cockroachDriver = {
|
||||
...dialect,
|
||||
materializedViews: true,
|
||||
dropColumnDependencies: ['primaryKey'],
|
||||
dropPrimaryKey: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@ class Dumper extends SqlDumper {
|
||||
renameColumn(column, newcol) {
|
||||
this.putCmd('^alter ^table %f ^rename ^column %i ^to %i', column, column.columnName, newcol);
|
||||
}
|
||||
|
||||
renameTable(obj, newname) {
|
||||
this.putCmd('^alter ^table %f ^rename ^to %i', obj, newname);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Dumper;
|
||||
|
||||
Reference in New Issue
Block a user