support for rename SQL object (mssql, postgres)

This commit is contained in:
Jan Prochazka
2024-10-31 10:48:32 +01:00
parent 2aed60390c
commit 81297383cb
12 changed files with 66 additions and 7 deletions

View File

@@ -38,6 +38,10 @@ class Dumper extends SqlDumper {
this.putCmd('^alter ^table %f ^rename ^to %i', obj, newname);
}
renameSqlObject(obj, newname) {
this.putCmd('^alter %k %f ^rename ^to %i', this.getSqlObjectSqlName(obj.objectTypeField), obj, newname);
}
renameColumn(column, newcol) {
this.putCmd('^alter ^table %f ^rename ^column %i ^to %i', column, column.columnName, newcol);
}

View File

@@ -34,6 +34,7 @@ const dialect = {
createCheck: true,
dropCheck: true,
allowMultipleValuesInsert: true,
renameSqlObject: true,
dropReferencesWhenDropTable: true,
requireStandaloneSelectForScopeIdentity: true,