rake-db 2.4.14 → 2.4.15

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 CHANGED
@@ -2423,7 +2423,7 @@ const astToMigration = (config, ast) => {
2423
2423
  if (first.length) {
2424
2424
  code += `
2425
2425
  change(async (db) => {
2426
- ${pqb.codeToString(first, " ", " ")}
2426
+ ${orchidCore.codeToString(first, " ", " ")}
2427
2427
  });
2428
2428
  `;
2429
2429
  }
@@ -2431,7 +2431,7 @@ ${pqb.codeToString(first, " ", " ")}
2431
2431
  for (const table of tables) {
2432
2432
  code += `
2433
2433
  change(async (db) => {
2434
- ${pqb.codeToString(table, " ", " ")}
2434
+ ${orchidCore.codeToString(table, " ", " ")}
2435
2435
  });
2436
2436
  `;
2437
2437
  }
@@ -2439,7 +2439,7 @@ ${pqb.codeToString(table, " ", " ")}
2439
2439
  if (foreignKeys.length) {
2440
2440
  code += `
2441
2441
  change(async (db) => {
2442
- ${pqb.codeToString(foreignKeys, " ", " ")}
2442
+ ${orchidCore.codeToString(foreignKeys, " ", " ")}
2443
2443
  });
2444
2444
  `;
2445
2445
  }
@@ -2479,9 +2479,9 @@ const createDomain = (ast) => {
2479
2479
  if (ast.collation)
2480
2480
  props.push(`collation: ${orchidCore.singleQuote(ast.collation)},`);
2481
2481
  if (ast.default)
2482
- props.push(`default: ${pqb.rawToCode("db", ast.default)},`);
2482
+ props.push(`default: ${orchidCore.rawToCode("db", ast.default)},`);
2483
2483
  if (ast.check)
2484
- props.push(`check: ${pqb.rawToCode("db", ast.check)},`);
2484
+ props.push(`check: ${orchidCore.rawToCode("db", ast.check)},`);
2485
2485
  orchidCore.addCode(code, ", {");
2486
2486
  code.push(props);
2487
2487
  orchidCore.addCode(code, "}");
@@ -2575,13 +2575,13 @@ const pullDbStructure = async (options, config) => {
2575
2575
  `Found unsupported types:
2576
2576
  ${unsupportedEntries.map(([type, columns]) => {
2577
2577
  count += columns.length;
2578
- return `${type} is used for column${columns.length > 1 ? "s" : ""} ${columns.join(", ")}`;
2578
+ return `- ${type} is used for column${columns.length > 1 ? "s" : ""} ${columns.join(", ")}`;
2579
2579
  }).join("\n")}
2580
-
2581
2580
  Append \`as\` method manually to ${count > 1 ? "these" : "this"} column${count > 1 ? "s" : ""} to treat ${count > 1 ? "them" : "it"} as other column type`
2582
2581
  );
2583
2582
  }
2584
2583
  (_c = config.logger) == null ? void 0 : _c.log("Database pulled successfully");
2584
+ adapter.close();
2585
2585
  };
2586
2586
 
2587
2587
  const rakeDb = async (options, partialConfig = {}, args = process.argv.slice(2)) => {