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