rake-db 2.4.18 → 2.4.20
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 +2 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2133,11 +2133,6 @@ var __objRest = (source, exclude) => {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
return target;
|
|
2135
2135
|
};
|
|
2136
|
-
class RakeDbEnumColumn extends pqb.EnumColumn {
|
|
2137
|
-
toCode(t) {
|
|
2138
|
-
return pqb.columnCode(this, t, `enum('${this.enumName}')`);
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
2136
|
const matchMap = {
|
|
2142
2137
|
s: void 0,
|
|
2143
2138
|
f: "FULL",
|
|
@@ -2330,7 +2325,7 @@ const getColumn = (ctx, data, domains, _a) => {
|
|
|
2330
2325
|
(item) => item.name === type && item.schemaName === typeSchema
|
|
2331
2326
|
);
|
|
2332
2327
|
if (enumType) {
|
|
2333
|
-
column = new
|
|
2328
|
+
column = new pqb.EnumColumn({}, type, enumType.values);
|
|
2334
2329
|
} else {
|
|
2335
2330
|
column = new pqb.CustomTypeColumn({}, type);
|
|
2336
2331
|
((_b2 = (_a2 = ctx.unsupportedTypes)[type]) != null ? _b2 : _a2[type] = []).push(
|
|
@@ -2598,7 +2593,7 @@ const createTable = (config, ast) => {
|
|
|
2598
2593
|
if (hasTimestamps && (key === "createdAt" || key === "updatedAt"))
|
|
2599
2594
|
continue;
|
|
2600
2595
|
const line = [`${orchidCore.quoteObjectKey(key)}: `];
|
|
2601
|
-
for (const part of ast.shape[key].toCode("t")) {
|
|
2596
|
+
for (const part of ast.shape[key].toCode("t", true)) {
|
|
2602
2597
|
orchidCore.addCode(line, part);
|
|
2603
2598
|
}
|
|
2604
2599
|
orchidCore.addCode(line, ",");
|