diff --git a/src/dialects/postgres/schema/compiler.js b/src/dialects/postgres/schema/compiler.js index 5665601f6..b397202a9 100644 --- a/src/dialects/postgres/schema/compiler.js +++ b/src/dialects/postgres/schema/compiler.js @@ -59,7 +59,7 @@ SchemaCompiler_PG.prototype.qualifiedTableName = function(tableName) { // Compile a rename table command. SchemaCompiler_PG.prototype.renameTable = function(from, to) { - this.pushQuery('alter table ' + this.qualifiedTableName(from) + ' rename to ' + this.qualifiedTableName(to)); + this.pushQuery('alter table ' + this.qualifiedTableName(from) + ' rename to ' + this.formatter.wrap(to)); }; SchemaCompiler_PG.prototype.createSchema = function(schemaName) {