orchid-orm 1.56.5 → 1.57.0
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 +15 -5
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -15
- package/dist/index.mjs.map +1 -1
- package/dist/migrations/node-postgres.js +2 -16
- package/dist/migrations/node-postgres.js.map +1 -1
- package/dist/migrations/node-postgres.mjs +3 -17
- package/dist/migrations/node-postgres.mjs.map +1 -1
- package/dist/migrations/postgres-js.js +2 -16
- package/dist/migrations/postgres-js.js.map +1 -1
- package/dist/migrations/postgres-js.mjs +3 -17
- package/dist/migrations/postgres-js.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -1783,14 +1783,7 @@ const collectCodeChecks = ({
|
|
|
1783
1783
|
const baseName = `${codeTable.table}_${columnName}_check`;
|
|
1784
1784
|
codeChecks.push(
|
|
1785
1785
|
...column.data.checks.map((check) => {
|
|
1786
|
-
|
|
1787
|
-
if (!name) {
|
|
1788
|
-
name = baseName;
|
|
1789
|
-
let n = 0;
|
|
1790
|
-
while (names.has(name)) {
|
|
1791
|
-
name = baseName + ++n;
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1786
|
+
const name = check.name || orchidCore.getFreeSetAlias(names, baseName, 1);
|
|
1794
1787
|
names.add(name);
|
|
1795
1788
|
return {
|
|
1796
1789
|
check,
|
|
@@ -1805,14 +1798,7 @@ const collectCodeChecks = ({
|
|
|
1805
1798
|
const { check } = constraint;
|
|
1806
1799
|
if (check) {
|
|
1807
1800
|
const baseName = `${codeTable.table}_check`;
|
|
1808
|
-
|
|
1809
|
-
if (!name) {
|
|
1810
|
-
name = baseName;
|
|
1811
|
-
let n = 0;
|
|
1812
|
-
while (names.has(name)) {
|
|
1813
|
-
name = baseName + ++n;
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1801
|
+
const name = constraint.name || orchidCore.getFreeSetAlias(names, baseName, 1);
|
|
1816
1802
|
names.add(name);
|
|
1817
1803
|
codeChecks.push({
|
|
1818
1804
|
check: { sql: check, name: constraint.name },
|