rake-db 2.4.30 → 2.4.32
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 +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -444,6 +444,9 @@ const indexesToQuery = (up, { schema, name }, indexes) => {
|
|
|
444
444
|
`INCLUDE (${toArray(options.include).map((column) => `"${column}"`).join(", ")})`
|
|
445
445
|
);
|
|
446
446
|
}
|
|
447
|
+
if (options.nullsNotDistinct) {
|
|
448
|
+
sql.push(`NULLS NOT DISTINCT`);
|
|
449
|
+
}
|
|
447
450
|
if (options.with) {
|
|
448
451
|
sql.push(`WITH (${options.with})`);
|
|
449
452
|
}
|
|
@@ -1937,6 +1940,7 @@ ORDER BY c.ordinal_position`
|
|
|
1937
1940
|
)
|
|
1938
1941
|
FROM unnest(i.indkey[indnkeyatts:]) AS j(e)
|
|
1939
1942
|
) AS "include",
|
|
1943
|
+
(to_jsonb(i.*)->'indnullsnotdistinct')::bool AS "nullsNotDistinct",
|
|
1940
1944
|
NULLIF(pg_catalog.array_to_string(
|
|
1941
1945
|
ic.reloptions || array(SELECT 'toast.' || x FROM pg_catalog.unnest(tc.reloptions) x),
|
|
1942
1946
|
', '
|
|
@@ -2433,6 +2437,7 @@ const pushTableAst = (ctx, ast, data, domains, table, pendingTables, innerConstr
|
|
|
2433
2437
|
using: index.using === "btree" ? void 0 : index.using,
|
|
2434
2438
|
unique: index.isUnique,
|
|
2435
2439
|
include: index.include,
|
|
2440
|
+
nullsNotDistinct: index.nullsNotDistinct,
|
|
2436
2441
|
with: index.with,
|
|
2437
2442
|
tablespace: index.tablespace,
|
|
2438
2443
|
where: index.where
|
|
@@ -2485,6 +2490,7 @@ const pushTableAst = (ctx, ast, data, domains, table, pendingTables, innerConstr
|
|
|
2485
2490
|
using: index.using === "btree" ? void 0 : index.using,
|
|
2486
2491
|
unique: index.isUnique,
|
|
2487
2492
|
include: index.include,
|
|
2493
|
+
nullsNotDistinct: index.nullsNotDistinct,
|
|
2488
2494
|
with: index.with,
|
|
2489
2495
|
tablespace: index.tablespace,
|
|
2490
2496
|
where: index.where
|