drizzle-kit 0.19.6-8f467f3 → 0.19.6
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +21 -0
- package/package.json +1 -1
package/index.cjs
CHANGED
@@ -11647,6 +11647,27 @@ The unique constraint ${source_default.underline.blue(
|
|
11647
11647
|
return it.name;
|
11648
11648
|
}
|
11649
11649
|
});
|
11650
|
+
if (value.config.unique) {
|
11651
|
+
if (typeof uniqueConstraintObject[name] !== "undefined") {
|
11652
|
+
console.log(
|
11653
|
+
`
|
11654
|
+
${withStyle.errorWarning(
|
11655
|
+
`We've found duplicated unique constraint names in ${source_default.underline.blue(
|
11656
|
+
tableName
|
11657
|
+
)} table.
|
11658
|
+
The unique index ${source_default.underline.blue(
|
11659
|
+
name
|
11660
|
+
)} on the ${source_default.underline.blue(
|
11661
|
+
indexColumns.join(",")
|
11662
|
+
)} columns is confilcting with a unique constraint name already defined for ${source_default.underline.blue(
|
11663
|
+
uniqueConstraintObject[name].columns.join(",")
|
11664
|
+
)} columns
|
11665
|
+
`
|
11666
|
+
)}`
|
11667
|
+
);
|
11668
|
+
process.exit(1);
|
11669
|
+
}
|
11670
|
+
}
|
11650
11671
|
indexesObject[name] = {
|
11651
11672
|
name,
|
11652
11673
|
columns: indexColumns,
|