rake-db 2.36.3 → 2.36.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2161,7 +2161,7 @@ var Migration = class {
|
|
|
2161
2161
|
};
|
|
2162
2162
|
for (const pair of Object.entries(ast.values)) {
|
|
2163
2163
|
const [from, to] = this.up ? pair : [pair[1], pair[0]];
|
|
2164
|
-
await this.adapter.query(`ALTER TYPE ${quoteTable(ast.schema, ast.name)} RENAME VALUE
|
|
2164
|
+
await this.adapter.query(`ALTER TYPE ${quoteTable(ast.schema, ast.name)} RENAME VALUE ${(0, pqb_internal.singleQuote)(from)} TO ${(0, pqb_internal.singleQuote)(to)}`);
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
2167
|
/**
|
|
@@ -4204,8 +4204,8 @@ const astEncoders = {
|
|
|
4204
4204
|
enumValues(ast, _, currentSchema) {
|
|
4205
4205
|
return `await db.${ast.action}EnumValues(${quoteSchemaTable(ast, currentSchema)}, [${ast.values.map(pqb_internal.singleQuote).join(", ")}]);`;
|
|
4206
4206
|
},
|
|
4207
|
-
renameEnumValues(ast,
|
|
4208
|
-
return `await db.renameEnumValues(${quoteSchemaTable(ast, currentSchema)}, { ${Object.entries(ast.values).map(([from, to]) => `${(0, pqb_internal.quoteObjectKey)(from,
|
|
4207
|
+
renameEnumValues(ast, _, currentSchema) {
|
|
4208
|
+
return `await db.renameEnumValues(${quoteSchemaTable(ast, currentSchema)}, { ${Object.entries(ast.values).map(([from, to]) => `${(0, pqb_internal.quoteObjectKey)(from, false)}: ${(0, pqb_internal.singleQuote)(to)}`).join(", ")} });`;
|
|
4209
4209
|
},
|
|
4210
4210
|
changeEnumValues(ast, _, currentSchema) {
|
|
4211
4211
|
return `await db.changeEnumValues(${quoteSchemaTable(ast, currentSchema)}, [${ast.fromValues.map(pqb_internal.singleQuote).join(", ")}], [${ast.toValues.map(pqb_internal.singleQuote).join(", ")}]);`;
|