drizzle-kit 1.0.0-beta.1-9e70ee7 → 1.0.0-beta.1-8aabc28
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/bin.cjs +14 -6
- package/package.json +1 -1
package/bin.cjs
CHANGED
@@ -86256,9 +86256,9 @@ var init_introspect = __esm({
|
|
86256
86256
|
tableRelations[toTable2].push({
|
86257
86257
|
name: (0, import_pluralize.plural)(toTable1),
|
86258
86258
|
type: "many-through",
|
86259
|
-
tableFrom:
|
86260
|
-
columnsFrom: fk22.
|
86261
|
-
tableTo:
|
86259
|
+
tableFrom: toTable2,
|
86260
|
+
columnsFrom: fk22.columnsTo,
|
86261
|
+
tableTo: toTable1,
|
86262
86262
|
columnsTo: columnsTo2,
|
86263
86263
|
tableThrough,
|
86264
86264
|
columnsThroughFrom,
|
@@ -86315,7 +86315,15 @@ import * as schema from "./schema";
|
|
86315
86315
|
(it, originIndex) => relationIndex !== originIndex && it.tableTo === relation.tableTo
|
86316
86316
|
);
|
86317
86317
|
if (hasMultipleRelations) {
|
86318
|
-
|
86318
|
+
if (relation.type === "one") {
|
86319
|
+
relationName = `${relation.tableFrom}_${relation.columnsFrom.join("_")}_${relation.tableTo}_${relation.columnsTo.join("_")}`;
|
86320
|
+
} else if (relation.type === "many") {
|
86321
|
+
relationName = `${relation.tableTo}_${relation.columnsTo.join("_")}_${relation.tableFrom}_${relation.columnsFrom.join("_")}`;
|
86322
|
+
} else if (relation.type === "through") {
|
86323
|
+
relationName = `${relation.tableFrom}_${relation.columnsFrom.join("_")}_${relation.tableTo}_${relation.columnsTo.join("_")}_via_${relation.tableThrough}`;
|
86324
|
+
} else {
|
86325
|
+
relationName = `${relation.tableTo}_${relation.columnsTo.join("_")}_${relation.tableFrom}_${relation.columnsFrom.join("_")}_via_${relation.tableThrough}`;
|
86326
|
+
}
|
86319
86327
|
}
|
86320
86328
|
const hasDuplicatedRelation = originArray.some(
|
86321
86329
|
(it, originIndex) => relationIndex !== originIndex && it.name === relation.name
|
@@ -86325,7 +86333,7 @@ import * as schema from "./schema";
|
|
86325
86333
|
}
|
86326
86334
|
return {
|
86327
86335
|
...relation,
|
86328
|
-
name,
|
86336
|
+
name: withCasing4(name, casing2),
|
86329
86337
|
relationName
|
86330
86338
|
};
|
86331
86339
|
}
|
@@ -92721,7 +92729,7 @@ init_utils5();
|
|
92721
92729
|
var version2 = async () => {
|
92722
92730
|
const { npmVersion } = await ormCoreVersions();
|
92723
92731
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
92724
|
-
const envVersion = "1.0.0-beta.1-
|
92732
|
+
const envVersion = "1.0.0-beta.1-8aabc28";
|
92725
92733
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
92726
92734
|
const versions = `drizzle-kit: ${kitVersion}
|
92727
92735
|
${ormVersion}`;
|