rake-db 2.36.3 → 2.36.5

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.mjs CHANGED
@@ -2138,7 +2138,7 @@ var Migration = class {
2138
2138
  };
2139
2139
  for (const pair of Object.entries(ast.values)) {
2140
2140
  const [from, to] = this.up ? pair : [pair[1], pair[0]];
2141
- await this.adapter.query(`ALTER TYPE ${quoteTable(ast.schema, ast.name)} RENAME VALUE "${from}" TO "${to}"`);
2141
+ await this.adapter.query(`ALTER TYPE ${quoteTable(ast.schema, ast.name)} RENAME VALUE ${singleQuote(from)} TO ${singleQuote(to)}`);
2142
2142
  }
2143
2143
  }
2144
2144
  /**
@@ -4181,8 +4181,8 @@ const astEncoders = {
4181
4181
  enumValues(ast, _, currentSchema) {
4182
4182
  return `await db.${ast.action}EnumValues(${quoteSchemaTable(ast, currentSchema)}, [${ast.values.map(singleQuote).join(", ")}]);`;
4183
4183
  },
4184
- renameEnumValues(ast, config, currentSchema) {
4185
- return `await db.renameEnumValues(${quoteSchemaTable(ast, currentSchema)}, { ${Object.entries(ast.values).map(([from, to]) => `${quoteObjectKey(from, config.snakeCase)}: ${singleQuote(to)}`).join(", ")} });`;
4184
+ renameEnumValues(ast, _, currentSchema) {
4185
+ return `await db.renameEnumValues(${quoteSchemaTable(ast, currentSchema)}, { ${Object.entries(ast.values).map(([from, to]) => `${quoteObjectKey(from, false)}: ${singleQuote(to)}`).join(", ")} });`;
4186
4186
  },
4187
4187
  changeEnumValues(ast, _, currentSchema) {
4188
4188
  return `await db.changeEnumValues(${quoteSchemaTable(ast, currentSchema)}, [${ast.fromValues.map(singleQuote).join(", ")}], [${ast.toValues.map(singleQuote).join(", ")}]);`;