rake-db 2.23.42 → 2.23.43
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 +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.mjs
CHANGED
|
@@ -332,7 +332,7 @@ const indexesToQuery = (up, { schema, name: tableName }, indexes, snakeCase, lan
|
|
|
332
332
|
let hasWeight = options.tsVector && columns.some((column) => !!column.weight);
|
|
333
333
|
const columnsSql = columns.map((column) => {
|
|
334
334
|
let sql2 = [
|
|
335
|
-
"
|
|
335
|
+
"expression" in column ? `(${column.expression})` : `"${column.column}"`,
|
|
336
336
|
column.collate && `COLLATE ${quoteNameFromString(column.collate)}`,
|
|
337
337
|
column.opclass,
|
|
338
338
|
column.order
|
|
@@ -396,7 +396,7 @@ const excludesToQuery = (up, { schema, name: tableName }, excludes, snakeCase) =
|
|
|
396
396
|
}
|
|
397
397
|
const columnList = columns.map(
|
|
398
398
|
(column) => [
|
|
399
|
-
"
|
|
399
|
+
"expression" in column ? `(${column.expression})` : `"${column.column}"`,
|
|
400
400
|
column.collate && `COLLATE ${quoteNameFromString(column.collate)}`,
|
|
401
401
|
column.opclass,
|
|
402
402
|
column.order,
|
|
@@ -4011,6 +4011,7 @@ async function introspectDbSchema(db) {
|
|
|
4011
4011
|
const data = await db.query(sql(version));
|
|
4012
4012
|
const result = data.rows[0];
|
|
4013
4013
|
for (const domain of result.domains) {
|
|
4014
|
+
domain.checks = domain.checks?.filter((check) => check);
|
|
4014
4015
|
nullsToUndefined(domain);
|
|
4015
4016
|
}
|
|
4016
4017
|
for (const table of result.tables) {
|
|
@@ -4324,7 +4325,7 @@ const indexesOrExcludesToAst = (tableName, tableData, key) => {
|
|
|
4324
4325
|
acc.push({
|
|
4325
4326
|
columns: item.columns.map((it, i) => ({
|
|
4326
4327
|
with: "exclude" in item && item.exclude ? item.exclude[i] : void 0,
|
|
4327
|
-
..."
|
|
4328
|
+
..."expression" in it ? { expression: it.expression } : { column: toCamelCase(it.column) },
|
|
4328
4329
|
collate: it.collate,
|
|
4329
4330
|
opclass: it.opclass,
|
|
4330
4331
|
order: it.order
|