drizzle-kit 0.20.17-c057923 → 0.20.17-e041df8
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +13968 -23878
- package/cli/commands/migrate.d.ts +2 -2
- package/cli/commands/pgIntrospect.d.ts +1 -1
- package/cli/commands/utils.d.ts +2 -2
- package/cli/validations/cli.d.ts +18 -18
- package/cli/validations/common.d.ts +13 -13
- package/cli/validations/outputs.d.ts +2 -1
- package/index.d.mts +48 -2
- package/index.d.ts +48 -2
- package/package.json +1 -2
- package/payload.js +44 -45
- package/payload.mjs +44 -45
- package/schemaValidator.d.ts +7 -7
- package/serializer/pgSchema.d.ts +14 -14
- package/serializer/studio.d.ts +1 -1
- package/snapshotsDiffer.d.ts +2 -1
- package/utils-studio.js +8 -8
- package/utils-studio.mjs +8 -8
- package/utils.js +5 -5
- package/utils.mjs +5 -5
package/utils-studio.mjs
CHANGED
@@ -4568,7 +4568,7 @@ var init_pgSchema = __esm({
|
|
4568
4568
|
}).strict();
|
4569
4569
|
pgSchemaInternal = objectType({
|
4570
4570
|
version: literalType("6"),
|
4571
|
-
dialect: literalType("
|
4571
|
+
dialect: literalType("pg"),
|
4572
4572
|
tables: recordType(stringType(), table2),
|
4573
4573
|
enums: recordType(stringType(), enumSchema),
|
4574
4574
|
schemas: recordType(stringType(), stringType()),
|
@@ -4597,14 +4597,14 @@ var init_pgSchema = __esm({
|
|
4597
4597
|
}).strict();
|
4598
4598
|
pgSchemaSquashedV4 = objectType({
|
4599
4599
|
version: literalType("4"),
|
4600
|
-
dialect:
|
4600
|
+
dialect: enumType(["pg"]),
|
4601
4601
|
tables: recordType(stringType(), tableSquashedV42),
|
4602
4602
|
enums: recordType(stringType(), enumSchemaV1),
|
4603
4603
|
schemas: recordType(stringType(), stringType())
|
4604
4604
|
}).strict();
|
4605
4605
|
pgSchemaSquashed = objectType({
|
4606
4606
|
version: literalType("6"),
|
4607
|
-
dialect:
|
4607
|
+
dialect: enumType(["pg"]),
|
4608
4608
|
tables: recordType(stringType(), tableSquashed2),
|
4609
4609
|
enums: recordType(stringType(), enumSchema),
|
4610
4610
|
schemas: recordType(stringType(), stringType())
|
@@ -4616,7 +4616,7 @@ var init_pgSchema = __esm({
|
|
4616
4616
|
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema2]);
|
4617
4617
|
dryPg = pgSchema2.parse({
|
4618
4618
|
version: snapshotVersion,
|
4619
|
-
dialect: "
|
4619
|
+
dialect: "pg",
|
4620
4620
|
id: originUUID,
|
4621
4621
|
prevId: "",
|
4622
4622
|
tables: {},
|
@@ -5460,7 +5460,7 @@ var init_pgSerializer = __esm({
|
|
5460
5460
|
const columnName = columnResponse.attname;
|
5461
5461
|
const columnAdditionalDT = columnResponse.additional_dt;
|
5462
5462
|
const columnDimensions = columnResponse.array_dimensions;
|
5463
|
-
const
|
5463
|
+
const enumType2 = columnResponse.enum_name;
|
5464
5464
|
let columnType = columnResponse.data_type;
|
5465
5465
|
const primaryKey = tableConstraints.filter(
|
5466
5466
|
(mapRow) => columnName === mapRow.column_name && mapRow.constraint_type === "PRIMARY KEY"
|
@@ -5524,8 +5524,8 @@ var init_pgSerializer = __esm({
|
|
5524
5524
|
columnTypeMapped = trimChar(columnTypeMapped, '"');
|
5525
5525
|
columnToReturn[columnName] = {
|
5526
5526
|
name: columnName,
|
5527
|
-
type: columnAdditionalDT === "USER-DEFINED" ?
|
5528
|
-
typeSchema: enumsToReturn[`${tableSchema}.${
|
5527
|
+
type: columnAdditionalDT === "USER-DEFINED" ? enumType2 : columnTypeMapped,
|
5528
|
+
typeSchema: enumsToReturn[`${tableSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${tableSchema}.${enumType2}`].schema : void 0,
|
5529
5529
|
primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
|
5530
5530
|
// default: isSerial ? undefined : defaultValue,
|
5531
5531
|
notNull: columnResponse.is_nullable === "NO"
|
@@ -5608,7 +5608,7 @@ var init_pgSerializer = __esm({
|
|
5608
5608
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
5609
5609
|
return {
|
5610
5610
|
version: "6",
|
5611
|
-
dialect: "
|
5611
|
+
dialect: "pg",
|
5612
5612
|
tables: result,
|
5613
5613
|
enums: enumsToReturn,
|
5614
5614
|
schemas: schemasObject,
|
package/utils.js
CHANGED
@@ -4548,7 +4548,7 @@ var pgSchemaExternal = objectType({
|
|
4548
4548
|
}).strict();
|
4549
4549
|
var pgSchemaInternal = objectType({
|
4550
4550
|
version: literalType("6"),
|
4551
|
-
dialect: literalType("
|
4551
|
+
dialect: literalType("pg"),
|
4552
4552
|
tables: recordType(stringType(), table2),
|
4553
4553
|
enums: recordType(stringType(), enumSchema),
|
4554
4554
|
schemas: recordType(stringType(), stringType()),
|
@@ -4577,14 +4577,14 @@ var tableSquashedV42 = objectType({
|
|
4577
4577
|
}).strict();
|
4578
4578
|
var pgSchemaSquashedV4 = objectType({
|
4579
4579
|
version: literalType("4"),
|
4580
|
-
dialect:
|
4580
|
+
dialect: enumType(["pg"]),
|
4581
4581
|
tables: recordType(stringType(), tableSquashedV42),
|
4582
4582
|
enums: recordType(stringType(), enumSchemaV1),
|
4583
4583
|
schemas: recordType(stringType(), stringType())
|
4584
4584
|
}).strict();
|
4585
4585
|
var pgSchemaSquashed = objectType({
|
4586
4586
|
version: literalType("6"),
|
4587
|
-
dialect:
|
4587
|
+
dialect: enumType(["pg"]),
|
4588
4588
|
tables: recordType(stringType(), tableSquashed2),
|
4589
4589
|
enums: recordType(stringType(), enumSchema),
|
4590
4590
|
schemas: recordType(stringType(), stringType())
|
@@ -4596,7 +4596,7 @@ var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
4596
4596
|
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
4597
4597
|
var dryPg = pgSchema.parse({
|
4598
4598
|
version: snapshotVersion,
|
4599
|
-
dialect: "
|
4599
|
+
dialect: "pg",
|
4600
4600
|
id: originUUID,
|
4601
4601
|
prevId: "",
|
4602
4602
|
tables: {},
|
@@ -4758,7 +4758,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
4758
4758
|
};
|
4759
4759
|
var validatorForDialect = (dialect3) => {
|
4760
4760
|
switch (dialect3) {
|
4761
|
-
case "
|
4761
|
+
case "pg":
|
4762
4762
|
return { validator: backwardCompatiblePgSchema, version: 6 };
|
4763
4763
|
case "sqlite":
|
4764
4764
|
return { validator: backwardCompatibleSqliteSchema, version: 5 };
|
package/utils.mjs
CHANGED
@@ -4539,7 +4539,7 @@ var pgSchemaExternal = objectType({
|
|
4539
4539
|
}).strict();
|
4540
4540
|
var pgSchemaInternal = objectType({
|
4541
4541
|
version: literalType("6"),
|
4542
|
-
dialect: literalType("
|
4542
|
+
dialect: literalType("pg"),
|
4543
4543
|
tables: recordType(stringType(), table2),
|
4544
4544
|
enums: recordType(stringType(), enumSchema),
|
4545
4545
|
schemas: recordType(stringType(), stringType()),
|
@@ -4568,14 +4568,14 @@ var tableSquashedV42 = objectType({
|
|
4568
4568
|
}).strict();
|
4569
4569
|
var pgSchemaSquashedV4 = objectType({
|
4570
4570
|
version: literalType("4"),
|
4571
|
-
dialect:
|
4571
|
+
dialect: enumType(["pg"]),
|
4572
4572
|
tables: recordType(stringType(), tableSquashedV42),
|
4573
4573
|
enums: recordType(stringType(), enumSchemaV1),
|
4574
4574
|
schemas: recordType(stringType(), stringType())
|
4575
4575
|
}).strict();
|
4576
4576
|
var pgSchemaSquashed = objectType({
|
4577
4577
|
version: literalType("6"),
|
4578
|
-
dialect:
|
4578
|
+
dialect: enumType(["pg"]),
|
4579
4579
|
tables: recordType(stringType(), tableSquashed2),
|
4580
4580
|
enums: recordType(stringType(), enumSchema),
|
4581
4581
|
schemas: recordType(stringType(), stringType())
|
@@ -4587,7 +4587,7 @@ var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
4587
4587
|
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
4588
4588
|
var dryPg = pgSchema.parse({
|
4589
4589
|
version: snapshotVersion,
|
4590
|
-
dialect: "
|
4590
|
+
dialect: "pg",
|
4591
4591
|
id: originUUID,
|
4592
4592
|
prevId: "",
|
4593
4593
|
tables: {},
|
@@ -4749,7 +4749,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
4749
4749
|
};
|
4750
4750
|
var validatorForDialect = (dialect3) => {
|
4751
4751
|
switch (dialect3) {
|
4752
|
-
case "
|
4752
|
+
case "pg":
|
4753
4753
|
return { validator: backwardCompatiblePgSchema, version: 6 };
|
4754
4754
|
case "sqlite":
|
4755
4755
|
return { validator: backwardCompatibleSqliteSchema, version: 5 };
|