rake-db 2.8.17 → 2.8.18
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.d.ts +1 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -567,13 +567,14 @@ var __objRest$1 = (source, exclude) => {
|
|
|
567
567
|
return target;
|
|
568
568
|
};
|
|
569
569
|
const createTable$1 = async (migration, up, tableName, options, fn) => {
|
|
570
|
+
var _a;
|
|
570
571
|
const snakeCase = "snakeCase" in options ? options.snakeCase : migration.options.snakeCase;
|
|
571
572
|
const types = Object.assign(
|
|
572
573
|
Object.create(migration.columnTypes),
|
|
573
574
|
tableMethods
|
|
574
575
|
);
|
|
575
576
|
types[orchidCore.snakeCaseKey] = snakeCase;
|
|
576
|
-
const shape = pqb.getColumnTypes(types, fn);
|
|
577
|
+
const shape = pqb.getColumnTypes(types, fn, (_a = migration.options.baseTable) == null ? void 0 : _a.nowSQL);
|
|
577
578
|
const tableData = pqb.getTableData();
|
|
578
579
|
const ast = makeAst$2(
|
|
579
580
|
up,
|
|
@@ -585,8 +586,8 @@ const createTable$1 = async (migration, up, tableName, options, fn) => {
|
|
|
585
586
|
);
|
|
586
587
|
validatePrimaryKey(ast);
|
|
587
588
|
const queries = astToQueries$1(ast, snakeCase);
|
|
588
|
-
for (const
|
|
589
|
-
const
|
|
589
|
+
for (const _b of queries) {
|
|
590
|
+
const _c = _b, { then } = _c, query = __objRest$1(_c, ["then"]);
|
|
590
591
|
const result = await migration.adapter.arrays(query);
|
|
591
592
|
then == null ? void 0 : then(result);
|
|
592
593
|
}
|