drizzle-kit 0.21.2-3abb478 → 0.21.2-7202142
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +12 -116
- package/package.json +1 -1
- package/payload.d.mts +11 -5
- package/payload.d.ts +11 -5
- package/payload.js +10 -80
- package/payload.mjs +10 -80
- package/utils-studio.js +8 -78
- package/utils-studio.mjs +8 -78
- package/utils.js +7 -77
- package/utils.mjs +7 -77
package/bin.cjs
CHANGED
@@ -1435,7 +1435,7 @@ var init_global = __esm({
|
|
1435
1435
|
"src/global.ts"() {
|
1436
1436
|
"use strict";
|
1437
1437
|
originUUID = "00000000-0000-0000-0000-000000000000";
|
1438
|
-
snapshotVersion = "
|
1438
|
+
snapshotVersion = "6";
|
1439
1439
|
mapValues = (obj, map) => {
|
1440
1440
|
const result = Object.keys(obj).reduce(function(result2, key) {
|
1441
1441
|
result2[key] = map(obj[key]);
|
@@ -5637,7 +5637,7 @@ var init_mysqlSchema = __esm({
|
|
5637
5637
|
});
|
5638
5638
|
|
5639
5639
|
// src/serializer/pgSchema.ts
|
5640
|
-
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2,
|
5640
|
+
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, fk2, column2, tableV32, compositePK2, uniqueConstraint2, tableV42, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaExternal, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
|
5641
5641
|
var init_pgSchema = __esm({
|
5642
5642
|
"src/serializer/pgSchema.ts"() {
|
5643
5643
|
"use strict";
|
@@ -5721,33 +5721,6 @@ var init_pgSchema = __esm({
|
|
5721
5721
|
where: stringType().optional(),
|
5722
5722
|
concurrently: booleanType().default(false)
|
5723
5723
|
}).strict();
|
5724
|
-
indexV4 = objectType({
|
5725
|
-
name: stringType(),
|
5726
|
-
columns: stringType().array(),
|
5727
|
-
isUnique: booleanType(),
|
5728
|
-
with: recordType(stringType(), stringType()).optional(),
|
5729
|
-
method: stringType().default("btree"),
|
5730
|
-
where: stringType().optional(),
|
5731
|
-
concurrently: booleanType().default(false)
|
5732
|
-
}).strict();
|
5733
|
-
indexV5 = objectType({
|
5734
|
-
name: stringType(),
|
5735
|
-
columns: stringType().array(),
|
5736
|
-
isUnique: booleanType(),
|
5737
|
-
with: recordType(stringType(), stringType()).optional(),
|
5738
|
-
method: stringType().default("btree"),
|
5739
|
-
where: stringType().optional(),
|
5740
|
-
concurrently: booleanType().default(false)
|
5741
|
-
}).strict();
|
5742
|
-
indexV6 = objectType({
|
5743
|
-
name: stringType(),
|
5744
|
-
columns: stringType().array(),
|
5745
|
-
isUnique: booleanType(),
|
5746
|
-
with: recordType(stringType(), stringType()).optional(),
|
5747
|
-
method: stringType().default("btree"),
|
5748
|
-
where: stringType().optional(),
|
5749
|
-
concurrently: booleanType().default(false)
|
5750
|
-
}).strict();
|
5751
5724
|
fk2 = objectType({
|
5752
5725
|
name: stringType(),
|
5753
5726
|
tableFrom: stringType(),
|
@@ -5788,27 +5761,9 @@ var init_pgSchema = __esm({
|
|
5788
5761
|
name: stringType(),
|
5789
5762
|
schema: stringType(),
|
5790
5763
|
columns: recordType(stringType(), column2),
|
5791
|
-
indexes: recordType(stringType(),
|
5764
|
+
indexes: recordType(stringType(), index2),
|
5792
5765
|
foreignKeys: recordType(stringType(), fk2)
|
5793
5766
|
}).strict();
|
5794
|
-
tableV6 = objectType({
|
5795
|
-
name: stringType(),
|
5796
|
-
schema: stringType(),
|
5797
|
-
columns: recordType(stringType(), column2),
|
5798
|
-
indexes: recordType(stringType(), indexV6),
|
5799
|
-
foreignKeys: recordType(stringType(), fk2),
|
5800
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5801
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5802
|
-
}).strict();
|
5803
|
-
tableV5 = objectType({
|
5804
|
-
name: stringType(),
|
5805
|
-
schema: stringType(),
|
5806
|
-
columns: recordType(stringType(), column2),
|
5807
|
-
indexes: recordType(stringType(), indexV5),
|
5808
|
-
foreignKeys: recordType(stringType(), fk2),
|
5809
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5810
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5811
|
-
}).strict();
|
5812
5767
|
table2 = objectType({
|
5813
5768
|
name: stringType(),
|
5814
5769
|
schema: stringType(),
|
@@ -5853,7 +5808,7 @@ var init_pgSchema = __esm({
|
|
5853
5808
|
pgSchemaInternalV5 = objectType({
|
5854
5809
|
version: literalType("5"),
|
5855
5810
|
dialect: literalType("pg"),
|
5856
|
-
tables: recordType(stringType(),
|
5811
|
+
tables: recordType(stringType(), table2),
|
5857
5812
|
enums: recordType(stringType(), enumSchemaV1),
|
5858
5813
|
schemas: recordType(stringType(), stringType()),
|
5859
5814
|
_meta: objectType({
|
@@ -5863,19 +5818,6 @@ var init_pgSchema = __esm({
|
|
5863
5818
|
}),
|
5864
5819
|
internal: kitInternals2
|
5865
5820
|
}).strict();
|
5866
|
-
pgSchemaInternalV6 = objectType({
|
5867
|
-
version: literalType("6"),
|
5868
|
-
dialect: literalType("postgresql"),
|
5869
|
-
tables: recordType(stringType(), tableV6),
|
5870
|
-
enums: recordType(stringType(), enumSchema),
|
5871
|
-
schemas: recordType(stringType(), stringType()),
|
5872
|
-
_meta: objectType({
|
5873
|
-
schemas: recordType(stringType(), stringType()),
|
5874
|
-
tables: recordType(stringType(), stringType()),
|
5875
|
-
columns: recordType(stringType(), stringType())
|
5876
|
-
}),
|
5877
|
-
internal: kitInternals2
|
5878
|
-
}).strict();
|
5879
5821
|
pgSchemaExternal = objectType({
|
5880
5822
|
version: literalType("5"),
|
5881
5823
|
dialect: literalType("pg"),
|
@@ -5889,7 +5831,7 @@ var init_pgSchema = __esm({
|
|
5889
5831
|
})
|
5890
5832
|
}).strict();
|
5891
5833
|
pgSchemaInternal = objectType({
|
5892
|
-
version: literalType("
|
5834
|
+
version: literalType("6"),
|
5893
5835
|
dialect: literalType("postgresql"),
|
5894
5836
|
tables: recordType(stringType(), table2),
|
5895
5837
|
enums: recordType(stringType(), enumSchema),
|
@@ -5924,15 +5866,8 @@ var init_pgSchema = __esm({
|
|
5924
5866
|
enums: recordType(stringType(), enumSchemaV1),
|
5925
5867
|
schemas: recordType(stringType(), stringType())
|
5926
5868
|
}).strict();
|
5927
|
-
pgSchemaSquashedV6 = objectType({
|
5928
|
-
version: literalType("6"),
|
5929
|
-
dialect: literalType("postgresql"),
|
5930
|
-
tables: recordType(stringType(), tableSquashed2),
|
5931
|
-
enums: recordType(stringType(), enumSchema),
|
5932
|
-
schemas: recordType(stringType(), stringType())
|
5933
|
-
}).strict();
|
5934
5869
|
pgSchemaSquashed = objectType({
|
5935
|
-
version: literalType("
|
5870
|
+
version: literalType("6"),
|
5936
5871
|
dialect: literalType("postgresql"),
|
5937
5872
|
tables: recordType(stringType(), tableSquashed2),
|
5938
5873
|
enums: recordType(stringType(), enumSchema),
|
@@ -5941,13 +5876,8 @@ var init_pgSchema = __esm({
|
|
5941
5876
|
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5942
5877
|
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5943
5878
|
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5944
|
-
pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5945
5879
|
pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5946
|
-
backwardCompatiblePgSchema = unionType([
|
5947
|
-
pgSchemaV5,
|
5948
|
-
pgSchemaV6,
|
5949
|
-
pgSchema
|
5950
|
-
]);
|
5880
|
+
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
5951
5881
|
PgSquasher = {
|
5952
5882
|
squashIdx: (idx) => {
|
5953
5883
|
index2.parse(idx);
|
@@ -6093,7 +6023,7 @@ var init_pgSchema = __esm({
|
|
6093
6023
|
})
|
6094
6024
|
);
|
6095
6025
|
return {
|
6096
|
-
version: "
|
6026
|
+
version: "6",
|
6097
6027
|
dialect: json.dialect,
|
6098
6028
|
tables: mappedTables,
|
6099
6029
|
enums: json.enums,
|
@@ -6391,7 +6321,7 @@ var init_utils = __esm({
|
|
6391
6321
|
validatorForDialect = (dialect7) => {
|
6392
6322
|
switch (dialect7) {
|
6393
6323
|
case "postgresql":
|
6394
|
-
return { validator: backwardCompatiblePgSchema, version:
|
6324
|
+
return { validator: backwardCompatiblePgSchema, version: 6 };
|
6395
6325
|
case "sqlite":
|
6396
6326
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
6397
6327
|
case "mysql":
|
@@ -15899,7 +15829,7 @@ ${withStyle.errorWarning(
|
|
15899
15829
|
}).map((it) => [it.schemaName, it.schemaName])
|
15900
15830
|
);
|
15901
15831
|
return {
|
15902
|
-
version: "
|
15832
|
+
version: "6",
|
15903
15833
|
dialect: "postgresql",
|
15904
15834
|
tables: result,
|
15905
15835
|
enums: enumsToReturn,
|
@@ -16317,7 +16247,7 @@ ${withStyle.errorWarning(
|
|
16317
16247
|
}
|
16318
16248
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
16319
16249
|
return {
|
16320
|
-
version: "
|
16250
|
+
version: "6",
|
16321
16251
|
dialect: "postgresql",
|
16322
16252
|
tables: result,
|
16323
16253
|
enums: enumsToReturn,
|
@@ -113901,11 +113831,7 @@ var upPgHandler = (out) => {
|
|
113901
113831
|
raw: report.rawMap[it]
|
113902
113832
|
})).forEach((it) => {
|
113903
113833
|
const path5 = it.path;
|
113904
|
-
|
113905
|
-
if (it.raw.version === "5") {
|
113906
|
-
resultV6 = updateUpToV6(it.raw);
|
113907
|
-
}
|
113908
|
-
const result = updateUpToV7(resultV6);
|
113834
|
+
const result = updateUpToV6(it.raw);
|
113909
113835
|
console.log(`[${source_default.green("\u2713")}] ${path5}`);
|
113910
113836
|
(0, import_fs2.writeFileSync)(path5, JSON.stringify(result, null, 2));
|
113911
113837
|
});
|
@@ -113941,36 +113867,6 @@ var updateUpToV6 = (json) => {
|
|
113941
113867
|
enums
|
113942
113868
|
};
|
113943
113869
|
};
|
113944
|
-
var updateUpToV7 = (json) => {
|
113945
|
-
const schema5 = pgSchemaV6.parse(json);
|
113946
|
-
const tables = Object.fromEntries(
|
113947
|
-
Object.entries(schema5.tables).map((it) => {
|
113948
|
-
const table4 = it[1];
|
113949
|
-
const mappedIndexes = Object.fromEntries(
|
113950
|
-
Object.entries(table4.indexes).map((idx) => {
|
113951
|
-
const { columns, ...rest } = idx[1];
|
113952
|
-
const mappedColumns = columns.map((it2) => {
|
113953
|
-
return {
|
113954
|
-
expression: it2,
|
113955
|
-
isExpression: false,
|
113956
|
-
asc: true,
|
113957
|
-
nulls: "last",
|
113958
|
-
opClass: void 0
|
113959
|
-
};
|
113960
|
-
});
|
113961
|
-
return [idx[0], { columns: mappedColumns, ...rest }];
|
113962
|
-
})
|
113963
|
-
);
|
113964
|
-
return [it[0], { ...table4, indexes: mappedIndexes }];
|
113965
|
-
})
|
113966
|
-
);
|
113967
|
-
return {
|
113968
|
-
...schema5,
|
113969
|
-
version: "7",
|
113970
|
-
dialect: "postgresql",
|
113971
|
-
tables
|
113972
|
-
};
|
113973
|
-
};
|
113974
113870
|
|
113975
113871
|
// src/cli/commands/sqliteUp.ts
|
113976
113872
|
init_source();
|
package/package.json
CHANGED
package/payload.d.mts
CHANGED
@@ -5,7 +5,7 @@ import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
5
5
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
6
6
|
|
7
7
|
declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
8
|
-
version: zod.ZodLiteral<"
|
8
|
+
version: zod.ZodLiteral<"6">;
|
9
9
|
dialect: zod.ZodLiteral<"postgresql">;
|
10
10
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
11
11
|
name: zod.ZodString;
|
@@ -371,7 +371,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
371
371
|
}>;
|
372
372
|
id: string;
|
373
373
|
prevId: string;
|
374
|
-
version: "
|
374
|
+
version: "6";
|
375
375
|
dialect: "postgresql";
|
376
376
|
schemas: Record<string, string>;
|
377
377
|
_meta: {
|
@@ -445,7 +445,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
445
445
|
}>;
|
446
446
|
id: string;
|
447
447
|
prevId: string;
|
448
|
-
version: "
|
448
|
+
version: "6";
|
449
449
|
dialect: "postgresql";
|
450
450
|
schemas: Record<string, string>;
|
451
451
|
_meta: {
|
@@ -1099,11 +1099,17 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1099
1099
|
}>;
|
1100
1100
|
indexes: Record<string, {
|
1101
1101
|
name: string;
|
1102
|
-
columns:
|
1102
|
+
columns: {
|
1103
|
+
expression: string;
|
1104
|
+
isExpression: boolean;
|
1105
|
+
asc: boolean;
|
1106
|
+
nulls?: string | undefined;
|
1107
|
+
opclass?: string | undefined;
|
1108
|
+
}[];
|
1103
1109
|
isUnique: boolean;
|
1104
1110
|
method: string;
|
1105
1111
|
concurrently: boolean;
|
1106
|
-
with?: Record<string,
|
1112
|
+
with?: Record<string, any> | undefined;
|
1107
1113
|
where?: string | undefined;
|
1108
1114
|
}>;
|
1109
1115
|
foreignKeys: Record<string, {
|
package/payload.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
5
5
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
6
6
|
|
7
7
|
declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
8
|
-
version: zod.ZodLiteral<"
|
8
|
+
version: zod.ZodLiteral<"6">;
|
9
9
|
dialect: zod.ZodLiteral<"postgresql">;
|
10
10
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
11
11
|
name: zod.ZodString;
|
@@ -371,7 +371,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
371
371
|
}>;
|
372
372
|
id: string;
|
373
373
|
prevId: string;
|
374
|
-
version: "
|
374
|
+
version: "6";
|
375
375
|
dialect: "postgresql";
|
376
376
|
schemas: Record<string, string>;
|
377
377
|
_meta: {
|
@@ -445,7 +445,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
445
445
|
}>;
|
446
446
|
id: string;
|
447
447
|
prevId: string;
|
448
|
-
version: "
|
448
|
+
version: "6";
|
449
449
|
dialect: "postgresql";
|
450
450
|
schemas: Record<string, string>;
|
451
451
|
_meta: {
|
@@ -1099,11 +1099,17 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1099
1099
|
}>;
|
1100
1100
|
indexes: Record<string, {
|
1101
1101
|
name: string;
|
1102
|
-
columns:
|
1102
|
+
columns: {
|
1103
|
+
expression: string;
|
1104
|
+
isExpression: boolean;
|
1105
|
+
asc: boolean;
|
1106
|
+
nulls?: string | undefined;
|
1107
|
+
opclass?: string | undefined;
|
1108
|
+
}[];
|
1103
1109
|
isUnique: boolean;
|
1104
1110
|
method: string;
|
1105
1111
|
concurrently: boolean;
|
1106
|
-
with?: Record<string,
|
1112
|
+
with?: Record<string, any> | undefined;
|
1107
1113
|
where?: string | undefined;
|
1108
1114
|
}>;
|
1109
1115
|
foreignKeys: Record<string, {
|
package/payload.js
CHANGED
@@ -7407,7 +7407,7 @@ var init_global = __esm({
|
|
7407
7407
|
"src/global.ts"() {
|
7408
7408
|
"use strict";
|
7409
7409
|
originUUID = "00000000-0000-0000-0000-000000000000";
|
7410
|
-
snapshotVersion = "
|
7410
|
+
snapshotVersion = "6";
|
7411
7411
|
mapValues = (obj, map) => {
|
7412
7412
|
const result = Object.keys(obj).reduce(function(result2, key) {
|
7413
7413
|
result2[key] = map(obj[key]);
|
@@ -7691,7 +7691,7 @@ var init_mysqlSchema = __esm({
|
|
7691
7691
|
});
|
7692
7692
|
|
7693
7693
|
// src/serializer/pgSchema.ts
|
7694
|
-
var import_zod2, indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2,
|
7694
|
+
var import_zod2, indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, fk2, column2, tableV32, compositePK2, uniqueConstraint2, tableV42, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaExternal, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
|
7695
7695
|
var init_pgSchema = __esm({
|
7696
7696
|
"src/serializer/pgSchema.ts"() {
|
7697
7697
|
"use strict";
|
@@ -7775,33 +7775,6 @@ var init_pgSchema = __esm({
|
|
7775
7775
|
where: (0, import_zod2.string)().optional(),
|
7776
7776
|
concurrently: (0, import_zod2.boolean)().default(false)
|
7777
7777
|
}).strict();
|
7778
|
-
indexV4 = (0, import_zod2.object)({
|
7779
|
-
name: (0, import_zod2.string)(),
|
7780
|
-
columns: (0, import_zod2.string)().array(),
|
7781
|
-
isUnique: (0, import_zod2.boolean)(),
|
7782
|
-
with: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()).optional(),
|
7783
|
-
method: (0, import_zod2.string)().default("btree"),
|
7784
|
-
where: (0, import_zod2.string)().optional(),
|
7785
|
-
concurrently: (0, import_zod2.boolean)().default(false)
|
7786
|
-
}).strict();
|
7787
|
-
indexV5 = (0, import_zod2.object)({
|
7788
|
-
name: (0, import_zod2.string)(),
|
7789
|
-
columns: (0, import_zod2.string)().array(),
|
7790
|
-
isUnique: (0, import_zod2.boolean)(),
|
7791
|
-
with: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()).optional(),
|
7792
|
-
method: (0, import_zod2.string)().default("btree"),
|
7793
|
-
where: (0, import_zod2.string)().optional(),
|
7794
|
-
concurrently: (0, import_zod2.boolean)().default(false)
|
7795
|
-
}).strict();
|
7796
|
-
indexV6 = (0, import_zod2.object)({
|
7797
|
-
name: (0, import_zod2.string)(),
|
7798
|
-
columns: (0, import_zod2.string)().array(),
|
7799
|
-
isUnique: (0, import_zod2.boolean)(),
|
7800
|
-
with: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()).optional(),
|
7801
|
-
method: (0, import_zod2.string)().default("btree"),
|
7802
|
-
where: (0, import_zod2.string)().optional(),
|
7803
|
-
concurrently: (0, import_zod2.boolean)().default(false)
|
7804
|
-
}).strict();
|
7805
7778
|
fk2 = (0, import_zod2.object)({
|
7806
7779
|
name: (0, import_zod2.string)(),
|
7807
7780
|
tableFrom: (0, import_zod2.string)(),
|
@@ -7842,27 +7815,9 @@ var init_pgSchema = __esm({
|
|
7842
7815
|
name: (0, import_zod2.string)(),
|
7843
7816
|
schema: (0, import_zod2.string)(),
|
7844
7817
|
columns: (0, import_zod2.record)((0, import_zod2.string)(), column2),
|
7845
|
-
indexes: (0, import_zod2.record)((0, import_zod2.string)(),
|
7818
|
+
indexes: (0, import_zod2.record)((0, import_zod2.string)(), index2),
|
7846
7819
|
foreignKeys: (0, import_zod2.record)((0, import_zod2.string)(), fk2)
|
7847
7820
|
}).strict();
|
7848
|
-
tableV6 = (0, import_zod2.object)({
|
7849
|
-
name: (0, import_zod2.string)(),
|
7850
|
-
schema: (0, import_zod2.string)(),
|
7851
|
-
columns: (0, import_zod2.record)((0, import_zod2.string)(), column2),
|
7852
|
-
indexes: (0, import_zod2.record)((0, import_zod2.string)(), indexV6),
|
7853
|
-
foreignKeys: (0, import_zod2.record)((0, import_zod2.string)(), fk2),
|
7854
|
-
compositePrimaryKeys: (0, import_zod2.record)((0, import_zod2.string)(), compositePK2),
|
7855
|
-
uniqueConstraints: (0, import_zod2.record)((0, import_zod2.string)(), uniqueConstraint2).default({})
|
7856
|
-
}).strict();
|
7857
|
-
tableV5 = (0, import_zod2.object)({
|
7858
|
-
name: (0, import_zod2.string)(),
|
7859
|
-
schema: (0, import_zod2.string)(),
|
7860
|
-
columns: (0, import_zod2.record)((0, import_zod2.string)(), column2),
|
7861
|
-
indexes: (0, import_zod2.record)((0, import_zod2.string)(), indexV5),
|
7862
|
-
foreignKeys: (0, import_zod2.record)((0, import_zod2.string)(), fk2),
|
7863
|
-
compositePrimaryKeys: (0, import_zod2.record)((0, import_zod2.string)(), compositePK2),
|
7864
|
-
uniqueConstraints: (0, import_zod2.record)((0, import_zod2.string)(), uniqueConstraint2).default({})
|
7865
|
-
}).strict();
|
7866
7821
|
table2 = (0, import_zod2.object)({
|
7867
7822
|
name: (0, import_zod2.string)(),
|
7868
7823
|
schema: (0, import_zod2.string)(),
|
@@ -7907,7 +7862,7 @@ var init_pgSchema = __esm({
|
|
7907
7862
|
pgSchemaInternalV5 = (0, import_zod2.object)({
|
7908
7863
|
version: (0, import_zod2.literal)("5"),
|
7909
7864
|
dialect: (0, import_zod2.literal)("pg"),
|
7910
|
-
tables: (0, import_zod2.record)((0, import_zod2.string)(),
|
7865
|
+
tables: (0, import_zod2.record)((0, import_zod2.string)(), table2),
|
7911
7866
|
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchemaV1),
|
7912
7867
|
schemas: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()),
|
7913
7868
|
_meta: (0, import_zod2.object)({
|
@@ -7917,19 +7872,6 @@ var init_pgSchema = __esm({
|
|
7917
7872
|
}),
|
7918
7873
|
internal: kitInternals2
|
7919
7874
|
}).strict();
|
7920
|
-
pgSchemaInternalV6 = (0, import_zod2.object)({
|
7921
|
-
version: (0, import_zod2.literal)("6"),
|
7922
|
-
dialect: (0, import_zod2.literal)("postgresql"),
|
7923
|
-
tables: (0, import_zod2.record)((0, import_zod2.string)(), tableV6),
|
7924
|
-
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchema),
|
7925
|
-
schemas: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()),
|
7926
|
-
_meta: (0, import_zod2.object)({
|
7927
|
-
schemas: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()),
|
7928
|
-
tables: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)()),
|
7929
|
-
columns: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)())
|
7930
|
-
}),
|
7931
|
-
internal: kitInternals2
|
7932
|
-
}).strict();
|
7933
7875
|
pgSchemaExternal = (0, import_zod2.object)({
|
7934
7876
|
version: (0, import_zod2.literal)("5"),
|
7935
7877
|
dialect: (0, import_zod2.literal)("pg"),
|
@@ -7943,7 +7885,7 @@ var init_pgSchema = __esm({
|
|
7943
7885
|
})
|
7944
7886
|
}).strict();
|
7945
7887
|
pgSchemaInternal = (0, import_zod2.object)({
|
7946
|
-
version: (0, import_zod2.literal)("
|
7888
|
+
version: (0, import_zod2.literal)("6"),
|
7947
7889
|
dialect: (0, import_zod2.literal)("postgresql"),
|
7948
7890
|
tables: (0, import_zod2.record)((0, import_zod2.string)(), table2),
|
7949
7891
|
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchema),
|
@@ -7978,15 +7920,8 @@ var init_pgSchema = __esm({
|
|
7978
7920
|
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchemaV1),
|
7979
7921
|
schemas: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)())
|
7980
7922
|
}).strict();
|
7981
|
-
pgSchemaSquashedV6 = (0, import_zod2.object)({
|
7982
|
-
version: (0, import_zod2.literal)("6"),
|
7983
|
-
dialect: (0, import_zod2.literal)("postgresql"),
|
7984
|
-
tables: (0, import_zod2.record)((0, import_zod2.string)(), tableSquashed2),
|
7985
|
-
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchema),
|
7986
|
-
schemas: (0, import_zod2.record)((0, import_zod2.string)(), (0, import_zod2.string)())
|
7987
|
-
}).strict();
|
7988
7923
|
pgSchemaSquashed = (0, import_zod2.object)({
|
7989
|
-
version: (0, import_zod2.literal)("
|
7924
|
+
version: (0, import_zod2.literal)("6"),
|
7990
7925
|
dialect: (0, import_zod2.literal)("postgresql"),
|
7991
7926
|
tables: (0, import_zod2.record)((0, import_zod2.string)(), tableSquashed2),
|
7992
7927
|
enums: (0, import_zod2.record)((0, import_zod2.string)(), enumSchema),
|
@@ -7995,13 +7930,8 @@ var init_pgSchema = __esm({
|
|
7995
7930
|
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
7996
7931
|
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
7997
7932
|
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
7998
|
-
pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
7999
7933
|
pgSchema = pgSchemaInternal.merge(schemaHash2);
|
8000
|
-
backwardCompatiblePgSchema = (0, import_zod2.union)([
|
8001
|
-
pgSchemaV5,
|
8002
|
-
pgSchemaV6,
|
8003
|
-
pgSchema
|
8004
|
-
]);
|
7934
|
+
backwardCompatiblePgSchema = (0, import_zod2.union)([pgSchemaV5, pgSchema]);
|
8005
7935
|
PgSquasher = {
|
8006
7936
|
squashIdx: (idx) => {
|
8007
7937
|
index2.parse(idx);
|
@@ -8147,7 +8077,7 @@ var init_pgSchema = __esm({
|
|
8147
8077
|
})
|
8148
8078
|
);
|
8149
8079
|
return {
|
8150
|
-
version: "
|
8080
|
+
version: "6",
|
8151
8081
|
dialect: json.dialect,
|
8152
8082
|
tables: mappedTables,
|
8153
8083
|
enums: json.enums,
|
@@ -9258,7 +9188,7 @@ ${withStyle.errorWarning(
|
|
9258
9188
|
}).map((it) => [it.schemaName, it.schemaName])
|
9259
9189
|
);
|
9260
9190
|
return {
|
9261
|
-
version: "
|
9191
|
+
version: "6",
|
9262
9192
|
dialect: "postgresql",
|
9263
9193
|
tables: result,
|
9264
9194
|
enums: enumsToReturn,
|
@@ -9676,7 +9606,7 @@ ${withStyle.errorWarning(
|
|
9676
9606
|
}
|
9677
9607
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
9678
9608
|
return {
|
9679
|
-
version: "
|
9609
|
+
version: "6",
|
9680
9610
|
dialect: "postgresql",
|
9681
9611
|
tables: result,
|
9682
9612
|
enums: enumsToReturn,
|
package/payload.mjs
CHANGED
@@ -7413,7 +7413,7 @@ var init_global = __esm({
|
|
7413
7413
|
"src/global.ts"() {
|
7414
7414
|
"use strict";
|
7415
7415
|
originUUID = "00000000-0000-0000-0000-000000000000";
|
7416
|
-
snapshotVersion = "
|
7416
|
+
snapshotVersion = "6";
|
7417
7417
|
mapValues = (obj, map) => {
|
7418
7418
|
const result = Object.keys(obj).reduce(function(result2, key) {
|
7419
7419
|
result2[key] = map(obj[key]);
|
@@ -7717,7 +7717,7 @@ import {
|
|
7717
7717
|
array,
|
7718
7718
|
number
|
7719
7719
|
} from "zod";
|
7720
|
-
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2,
|
7720
|
+
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, fk2, column2, tableV32, compositePK2, uniqueConstraint2, tableV42, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaExternal, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
|
7721
7721
|
var init_pgSchema = __esm({
|
7722
7722
|
"src/serializer/pgSchema.ts"() {
|
7723
7723
|
"use strict";
|
@@ -7800,33 +7800,6 @@ var init_pgSchema = __esm({
|
|
7800
7800
|
where: string2().optional(),
|
7801
7801
|
concurrently: boolean2().default(false)
|
7802
7802
|
}).strict();
|
7803
|
-
indexV4 = object2({
|
7804
|
-
name: string2(),
|
7805
|
-
columns: string2().array(),
|
7806
|
-
isUnique: boolean2(),
|
7807
|
-
with: record2(string2(), string2()).optional(),
|
7808
|
-
method: string2().default("btree"),
|
7809
|
-
where: string2().optional(),
|
7810
|
-
concurrently: boolean2().default(false)
|
7811
|
-
}).strict();
|
7812
|
-
indexV5 = object2({
|
7813
|
-
name: string2(),
|
7814
|
-
columns: string2().array(),
|
7815
|
-
isUnique: boolean2(),
|
7816
|
-
with: record2(string2(), string2()).optional(),
|
7817
|
-
method: string2().default("btree"),
|
7818
|
-
where: string2().optional(),
|
7819
|
-
concurrently: boolean2().default(false)
|
7820
|
-
}).strict();
|
7821
|
-
indexV6 = object2({
|
7822
|
-
name: string2(),
|
7823
|
-
columns: string2().array(),
|
7824
|
-
isUnique: boolean2(),
|
7825
|
-
with: record2(string2(), string2()).optional(),
|
7826
|
-
method: string2().default("btree"),
|
7827
|
-
where: string2().optional(),
|
7828
|
-
concurrently: boolean2().default(false)
|
7829
|
-
}).strict();
|
7830
7803
|
fk2 = object2({
|
7831
7804
|
name: string2(),
|
7832
7805
|
tableFrom: string2(),
|
@@ -7867,27 +7840,9 @@ var init_pgSchema = __esm({
|
|
7867
7840
|
name: string2(),
|
7868
7841
|
schema: string2(),
|
7869
7842
|
columns: record2(string2(), column2),
|
7870
|
-
indexes: record2(string2(),
|
7843
|
+
indexes: record2(string2(), index2),
|
7871
7844
|
foreignKeys: record2(string2(), fk2)
|
7872
7845
|
}).strict();
|
7873
|
-
tableV6 = object2({
|
7874
|
-
name: string2(),
|
7875
|
-
schema: string2(),
|
7876
|
-
columns: record2(string2(), column2),
|
7877
|
-
indexes: record2(string2(), indexV6),
|
7878
|
-
foreignKeys: record2(string2(), fk2),
|
7879
|
-
compositePrimaryKeys: record2(string2(), compositePK2),
|
7880
|
-
uniqueConstraints: record2(string2(), uniqueConstraint2).default({})
|
7881
|
-
}).strict();
|
7882
|
-
tableV5 = object2({
|
7883
|
-
name: string2(),
|
7884
|
-
schema: string2(),
|
7885
|
-
columns: record2(string2(), column2),
|
7886
|
-
indexes: record2(string2(), indexV5),
|
7887
|
-
foreignKeys: record2(string2(), fk2),
|
7888
|
-
compositePrimaryKeys: record2(string2(), compositePK2),
|
7889
|
-
uniqueConstraints: record2(string2(), uniqueConstraint2).default({})
|
7890
|
-
}).strict();
|
7891
7846
|
table2 = object2({
|
7892
7847
|
name: string2(),
|
7893
7848
|
schema: string2(),
|
@@ -7932,7 +7887,7 @@ var init_pgSchema = __esm({
|
|
7932
7887
|
pgSchemaInternalV5 = object2({
|
7933
7888
|
version: literal2("5"),
|
7934
7889
|
dialect: literal2("pg"),
|
7935
|
-
tables: record2(string2(),
|
7890
|
+
tables: record2(string2(), table2),
|
7936
7891
|
enums: record2(string2(), enumSchemaV1),
|
7937
7892
|
schemas: record2(string2(), string2()),
|
7938
7893
|
_meta: object2({
|
@@ -7942,19 +7897,6 @@ var init_pgSchema = __esm({
|
|
7942
7897
|
}),
|
7943
7898
|
internal: kitInternals2
|
7944
7899
|
}).strict();
|
7945
|
-
pgSchemaInternalV6 = object2({
|
7946
|
-
version: literal2("6"),
|
7947
|
-
dialect: literal2("postgresql"),
|
7948
|
-
tables: record2(string2(), tableV6),
|
7949
|
-
enums: record2(string2(), enumSchema),
|
7950
|
-
schemas: record2(string2(), string2()),
|
7951
|
-
_meta: object2({
|
7952
|
-
schemas: record2(string2(), string2()),
|
7953
|
-
tables: record2(string2(), string2()),
|
7954
|
-
columns: record2(string2(), string2())
|
7955
|
-
}),
|
7956
|
-
internal: kitInternals2
|
7957
|
-
}).strict();
|
7958
7900
|
pgSchemaExternal = object2({
|
7959
7901
|
version: literal2("5"),
|
7960
7902
|
dialect: literal2("pg"),
|
@@ -7968,7 +7910,7 @@ var init_pgSchema = __esm({
|
|
7968
7910
|
})
|
7969
7911
|
}).strict();
|
7970
7912
|
pgSchemaInternal = object2({
|
7971
|
-
version: literal2("
|
7913
|
+
version: literal2("6"),
|
7972
7914
|
dialect: literal2("postgresql"),
|
7973
7915
|
tables: record2(string2(), table2),
|
7974
7916
|
enums: record2(string2(), enumSchema),
|
@@ -8003,15 +7945,8 @@ var init_pgSchema = __esm({
|
|
8003
7945
|
enums: record2(string2(), enumSchemaV1),
|
8004
7946
|
schemas: record2(string2(), string2())
|
8005
7947
|
}).strict();
|
8006
|
-
pgSchemaSquashedV6 = object2({
|
8007
|
-
version: literal2("6"),
|
8008
|
-
dialect: literal2("postgresql"),
|
8009
|
-
tables: record2(string2(), tableSquashed2),
|
8010
|
-
enums: record2(string2(), enumSchema),
|
8011
|
-
schemas: record2(string2(), string2())
|
8012
|
-
}).strict();
|
8013
7948
|
pgSchemaSquashed = object2({
|
8014
|
-
version: literal2("
|
7949
|
+
version: literal2("6"),
|
8015
7950
|
dialect: literal2("postgresql"),
|
8016
7951
|
tables: record2(string2(), tableSquashed2),
|
8017
7952
|
enums: record2(string2(), enumSchema),
|
@@ -8020,13 +7955,8 @@ var init_pgSchema = __esm({
|
|
8020
7955
|
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
8021
7956
|
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
8022
7957
|
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
8023
|
-
pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
8024
7958
|
pgSchema = pgSchemaInternal.merge(schemaHash2);
|
8025
|
-
backwardCompatiblePgSchema = union3([
|
8026
|
-
pgSchemaV5,
|
8027
|
-
pgSchemaV6,
|
8028
|
-
pgSchema
|
8029
|
-
]);
|
7959
|
+
backwardCompatiblePgSchema = union3([pgSchemaV5, pgSchema]);
|
8030
7960
|
PgSquasher = {
|
8031
7961
|
squashIdx: (idx) => {
|
8032
7962
|
index2.parse(idx);
|
@@ -8172,7 +8102,7 @@ var init_pgSchema = __esm({
|
|
8172
8102
|
})
|
8173
8103
|
);
|
8174
8104
|
return {
|
8175
|
-
version: "
|
8105
|
+
version: "6",
|
8176
8106
|
dialect: json.dialect,
|
8177
8107
|
tables: mappedTables,
|
8178
8108
|
enums: json.enums,
|
@@ -9298,7 +9228,7 @@ ${withStyle.errorWarning(
|
|
9298
9228
|
}).map((it) => [it.schemaName, it.schemaName])
|
9299
9229
|
);
|
9300
9230
|
return {
|
9301
|
-
version: "
|
9231
|
+
version: "6",
|
9302
9232
|
dialect: "postgresql",
|
9303
9233
|
tables: result,
|
9304
9234
|
enums: enumsToReturn,
|
@@ -9716,7 +9646,7 @@ ${withStyle.errorWarning(
|
|
9716
9646
|
}
|
9717
9647
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
9718
9648
|
return {
|
9719
|
-
version: "
|
9649
|
+
version: "6",
|
9720
9650
|
dialect: "postgresql",
|
9721
9651
|
tables: result,
|
9722
9652
|
enums: enumsToReturn,
|
package/utils-studio.js
CHANGED
@@ -569,7 +569,7 @@ var init_global = __esm({
|
|
569
569
|
"src/global.ts"() {
|
570
570
|
"use strict";
|
571
571
|
originUUID = "00000000-0000-0000-0000-000000000000";
|
572
|
-
snapshotVersion = "
|
572
|
+
snapshotVersion = "6";
|
573
573
|
}
|
574
574
|
});
|
575
575
|
|
@@ -4498,7 +4498,7 @@ var init_mysqlSchema = __esm({
|
|
4498
4498
|
});
|
4499
4499
|
|
4500
4500
|
// src/serializer/pgSchema.ts
|
4501
|
-
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2,
|
4501
|
+
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, fk2, column2, tableV32, compositePK2, uniqueConstraint2, tableV42, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaExternal, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchema2, backwardCompatiblePgSchema, dryPg;
|
4502
4502
|
var init_pgSchema = __esm({
|
4503
4503
|
"src/serializer/pgSchema.ts"() {
|
4504
4504
|
"use strict";
|
@@ -4582,33 +4582,6 @@ var init_pgSchema = __esm({
|
|
4582
4582
|
where: stringType().optional(),
|
4583
4583
|
concurrently: booleanType().default(false)
|
4584
4584
|
}).strict();
|
4585
|
-
indexV4 = objectType({
|
4586
|
-
name: stringType(),
|
4587
|
-
columns: stringType().array(),
|
4588
|
-
isUnique: booleanType(),
|
4589
|
-
with: recordType(stringType(), stringType()).optional(),
|
4590
|
-
method: stringType().default("btree"),
|
4591
|
-
where: stringType().optional(),
|
4592
|
-
concurrently: booleanType().default(false)
|
4593
|
-
}).strict();
|
4594
|
-
indexV5 = objectType({
|
4595
|
-
name: stringType(),
|
4596
|
-
columns: stringType().array(),
|
4597
|
-
isUnique: booleanType(),
|
4598
|
-
with: recordType(stringType(), stringType()).optional(),
|
4599
|
-
method: stringType().default("btree"),
|
4600
|
-
where: stringType().optional(),
|
4601
|
-
concurrently: booleanType().default(false)
|
4602
|
-
}).strict();
|
4603
|
-
indexV6 = objectType({
|
4604
|
-
name: stringType(),
|
4605
|
-
columns: stringType().array(),
|
4606
|
-
isUnique: booleanType(),
|
4607
|
-
with: recordType(stringType(), stringType()).optional(),
|
4608
|
-
method: stringType().default("btree"),
|
4609
|
-
where: stringType().optional(),
|
4610
|
-
concurrently: booleanType().default(false)
|
4611
|
-
}).strict();
|
4612
4585
|
fk2 = objectType({
|
4613
4586
|
name: stringType(),
|
4614
4587
|
tableFrom: stringType(),
|
@@ -4649,27 +4622,9 @@ var init_pgSchema = __esm({
|
|
4649
4622
|
name: stringType(),
|
4650
4623
|
schema: stringType(),
|
4651
4624
|
columns: recordType(stringType(), column2),
|
4652
|
-
indexes: recordType(stringType(),
|
4625
|
+
indexes: recordType(stringType(), index2),
|
4653
4626
|
foreignKeys: recordType(stringType(), fk2)
|
4654
4627
|
}).strict();
|
4655
|
-
tableV6 = objectType({
|
4656
|
-
name: stringType(),
|
4657
|
-
schema: stringType(),
|
4658
|
-
columns: recordType(stringType(), column2),
|
4659
|
-
indexes: recordType(stringType(), indexV6),
|
4660
|
-
foreignKeys: recordType(stringType(), fk2),
|
4661
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
4662
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
4663
|
-
}).strict();
|
4664
|
-
tableV5 = objectType({
|
4665
|
-
name: stringType(),
|
4666
|
-
schema: stringType(),
|
4667
|
-
columns: recordType(stringType(), column2),
|
4668
|
-
indexes: recordType(stringType(), indexV5),
|
4669
|
-
foreignKeys: recordType(stringType(), fk2),
|
4670
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
4671
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
4672
|
-
}).strict();
|
4673
4628
|
table2 = objectType({
|
4674
4629
|
name: stringType(),
|
4675
4630
|
schema: stringType(),
|
@@ -4714,7 +4669,7 @@ var init_pgSchema = __esm({
|
|
4714
4669
|
pgSchemaInternalV5 = objectType({
|
4715
4670
|
version: literalType("5"),
|
4716
4671
|
dialect: literalType("pg"),
|
4717
|
-
tables: recordType(stringType(),
|
4672
|
+
tables: recordType(stringType(), table2),
|
4718
4673
|
enums: recordType(stringType(), enumSchemaV1),
|
4719
4674
|
schemas: recordType(stringType(), stringType()),
|
4720
4675
|
_meta: objectType({
|
@@ -4724,19 +4679,6 @@ var init_pgSchema = __esm({
|
|
4724
4679
|
}),
|
4725
4680
|
internal: kitInternals2
|
4726
4681
|
}).strict();
|
4727
|
-
pgSchemaInternalV6 = objectType({
|
4728
|
-
version: literalType("6"),
|
4729
|
-
dialect: literalType("postgresql"),
|
4730
|
-
tables: recordType(stringType(), tableV6),
|
4731
|
-
enums: recordType(stringType(), enumSchema),
|
4732
|
-
schemas: recordType(stringType(), stringType()),
|
4733
|
-
_meta: objectType({
|
4734
|
-
schemas: recordType(stringType(), stringType()),
|
4735
|
-
tables: recordType(stringType(), stringType()),
|
4736
|
-
columns: recordType(stringType(), stringType())
|
4737
|
-
}),
|
4738
|
-
internal: kitInternals2
|
4739
|
-
}).strict();
|
4740
4682
|
pgSchemaExternal = objectType({
|
4741
4683
|
version: literalType("5"),
|
4742
4684
|
dialect: literalType("pg"),
|
@@ -4750,7 +4692,7 @@ var init_pgSchema = __esm({
|
|
4750
4692
|
})
|
4751
4693
|
}).strict();
|
4752
4694
|
pgSchemaInternal = objectType({
|
4753
|
-
version: literalType("
|
4695
|
+
version: literalType("6"),
|
4754
4696
|
dialect: literalType("postgresql"),
|
4755
4697
|
tables: recordType(stringType(), table2),
|
4756
4698
|
enums: recordType(stringType(), enumSchema),
|
@@ -4785,15 +4727,8 @@ var init_pgSchema = __esm({
|
|
4785
4727
|
enums: recordType(stringType(), enumSchemaV1),
|
4786
4728
|
schemas: recordType(stringType(), stringType())
|
4787
4729
|
}).strict();
|
4788
|
-
pgSchemaSquashedV6 = objectType({
|
4789
|
-
version: literalType("6"),
|
4790
|
-
dialect: literalType("postgresql"),
|
4791
|
-
tables: recordType(stringType(), tableSquashed2),
|
4792
|
-
enums: recordType(stringType(), enumSchema),
|
4793
|
-
schemas: recordType(stringType(), stringType())
|
4794
|
-
}).strict();
|
4795
4730
|
pgSchemaSquashed = objectType({
|
4796
|
-
version: literalType("
|
4731
|
+
version: literalType("6"),
|
4797
4732
|
dialect: literalType("postgresql"),
|
4798
4733
|
tables: recordType(stringType(), tableSquashed2),
|
4799
4734
|
enums: recordType(stringType(), enumSchema),
|
@@ -4802,13 +4737,8 @@ var init_pgSchema = __esm({
|
|
4802
4737
|
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
4803
4738
|
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
4804
4739
|
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
4805
|
-
pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
4806
4740
|
pgSchema2 = pgSchemaInternal.merge(schemaHash2);
|
4807
|
-
backwardCompatiblePgSchema = unionType([
|
4808
|
-
pgSchemaV5,
|
4809
|
-
pgSchemaV6,
|
4810
|
-
pgSchema2
|
4811
|
-
]);
|
4741
|
+
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema2]);
|
4812
4742
|
dryPg = pgSchema2.parse({
|
4813
4743
|
version: snapshotVersion,
|
4814
4744
|
dialect: "postgresql",
|
@@ -5866,7 +5796,7 @@ var init_pgSerializer = __esm({
|
|
5866
5796
|
}
|
5867
5797
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
5868
5798
|
return {
|
5869
|
-
version: "
|
5799
|
+
version: "6",
|
5870
5800
|
dialect: "postgresql",
|
5871
5801
|
tables: result,
|
5872
5802
|
enums: enumsToReturn,
|
package/utils-studio.mjs
CHANGED
@@ -570,7 +570,7 @@ var init_global = __esm({
|
|
570
570
|
"src/global.ts"() {
|
571
571
|
"use strict";
|
572
572
|
originUUID = "00000000-0000-0000-0000-000000000000";
|
573
|
-
snapshotVersion = "
|
573
|
+
snapshotVersion = "6";
|
574
574
|
}
|
575
575
|
});
|
576
576
|
|
@@ -4499,7 +4499,7 @@ var init_mysqlSchema = __esm({
|
|
4499
4499
|
});
|
4500
4500
|
|
4501
4501
|
// src/serializer/pgSchema.ts
|
4502
|
-
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2,
|
4502
|
+
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, fk2, column2, tableV32, compositePK2, uniqueConstraint2, tableV42, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaExternal, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchema2, backwardCompatiblePgSchema, dryPg;
|
4503
4503
|
var init_pgSchema = __esm({
|
4504
4504
|
"src/serializer/pgSchema.ts"() {
|
4505
4505
|
"use strict";
|
@@ -4583,33 +4583,6 @@ var init_pgSchema = __esm({
|
|
4583
4583
|
where: stringType().optional(),
|
4584
4584
|
concurrently: booleanType().default(false)
|
4585
4585
|
}).strict();
|
4586
|
-
indexV4 = objectType({
|
4587
|
-
name: stringType(),
|
4588
|
-
columns: stringType().array(),
|
4589
|
-
isUnique: booleanType(),
|
4590
|
-
with: recordType(stringType(), stringType()).optional(),
|
4591
|
-
method: stringType().default("btree"),
|
4592
|
-
where: stringType().optional(),
|
4593
|
-
concurrently: booleanType().default(false)
|
4594
|
-
}).strict();
|
4595
|
-
indexV5 = objectType({
|
4596
|
-
name: stringType(),
|
4597
|
-
columns: stringType().array(),
|
4598
|
-
isUnique: booleanType(),
|
4599
|
-
with: recordType(stringType(), stringType()).optional(),
|
4600
|
-
method: stringType().default("btree"),
|
4601
|
-
where: stringType().optional(),
|
4602
|
-
concurrently: booleanType().default(false)
|
4603
|
-
}).strict();
|
4604
|
-
indexV6 = objectType({
|
4605
|
-
name: stringType(),
|
4606
|
-
columns: stringType().array(),
|
4607
|
-
isUnique: booleanType(),
|
4608
|
-
with: recordType(stringType(), stringType()).optional(),
|
4609
|
-
method: stringType().default("btree"),
|
4610
|
-
where: stringType().optional(),
|
4611
|
-
concurrently: booleanType().default(false)
|
4612
|
-
}).strict();
|
4613
4586
|
fk2 = objectType({
|
4614
4587
|
name: stringType(),
|
4615
4588
|
tableFrom: stringType(),
|
@@ -4650,27 +4623,9 @@ var init_pgSchema = __esm({
|
|
4650
4623
|
name: stringType(),
|
4651
4624
|
schema: stringType(),
|
4652
4625
|
columns: recordType(stringType(), column2),
|
4653
|
-
indexes: recordType(stringType(),
|
4626
|
+
indexes: recordType(stringType(), index2),
|
4654
4627
|
foreignKeys: recordType(stringType(), fk2)
|
4655
4628
|
}).strict();
|
4656
|
-
tableV6 = objectType({
|
4657
|
-
name: stringType(),
|
4658
|
-
schema: stringType(),
|
4659
|
-
columns: recordType(stringType(), column2),
|
4660
|
-
indexes: recordType(stringType(), indexV6),
|
4661
|
-
foreignKeys: recordType(stringType(), fk2),
|
4662
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
4663
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
4664
|
-
}).strict();
|
4665
|
-
tableV5 = objectType({
|
4666
|
-
name: stringType(),
|
4667
|
-
schema: stringType(),
|
4668
|
-
columns: recordType(stringType(), column2),
|
4669
|
-
indexes: recordType(stringType(), indexV5),
|
4670
|
-
foreignKeys: recordType(stringType(), fk2),
|
4671
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
4672
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
4673
|
-
}).strict();
|
4674
4629
|
table2 = objectType({
|
4675
4630
|
name: stringType(),
|
4676
4631
|
schema: stringType(),
|
@@ -4715,7 +4670,7 @@ var init_pgSchema = __esm({
|
|
4715
4670
|
pgSchemaInternalV5 = objectType({
|
4716
4671
|
version: literalType("5"),
|
4717
4672
|
dialect: literalType("pg"),
|
4718
|
-
tables: recordType(stringType(),
|
4673
|
+
tables: recordType(stringType(), table2),
|
4719
4674
|
enums: recordType(stringType(), enumSchemaV1),
|
4720
4675
|
schemas: recordType(stringType(), stringType()),
|
4721
4676
|
_meta: objectType({
|
@@ -4725,19 +4680,6 @@ var init_pgSchema = __esm({
|
|
4725
4680
|
}),
|
4726
4681
|
internal: kitInternals2
|
4727
4682
|
}).strict();
|
4728
|
-
pgSchemaInternalV6 = objectType({
|
4729
|
-
version: literalType("6"),
|
4730
|
-
dialect: literalType("postgresql"),
|
4731
|
-
tables: recordType(stringType(), tableV6),
|
4732
|
-
enums: recordType(stringType(), enumSchema),
|
4733
|
-
schemas: recordType(stringType(), stringType()),
|
4734
|
-
_meta: objectType({
|
4735
|
-
schemas: recordType(stringType(), stringType()),
|
4736
|
-
tables: recordType(stringType(), stringType()),
|
4737
|
-
columns: recordType(stringType(), stringType())
|
4738
|
-
}),
|
4739
|
-
internal: kitInternals2
|
4740
|
-
}).strict();
|
4741
4683
|
pgSchemaExternal = objectType({
|
4742
4684
|
version: literalType("5"),
|
4743
4685
|
dialect: literalType("pg"),
|
@@ -4751,7 +4693,7 @@ var init_pgSchema = __esm({
|
|
4751
4693
|
})
|
4752
4694
|
}).strict();
|
4753
4695
|
pgSchemaInternal = objectType({
|
4754
|
-
version: literalType("
|
4696
|
+
version: literalType("6"),
|
4755
4697
|
dialect: literalType("postgresql"),
|
4756
4698
|
tables: recordType(stringType(), table2),
|
4757
4699
|
enums: recordType(stringType(), enumSchema),
|
@@ -4786,15 +4728,8 @@ var init_pgSchema = __esm({
|
|
4786
4728
|
enums: recordType(stringType(), enumSchemaV1),
|
4787
4729
|
schemas: recordType(stringType(), stringType())
|
4788
4730
|
}).strict();
|
4789
|
-
pgSchemaSquashedV6 = objectType({
|
4790
|
-
version: literalType("6"),
|
4791
|
-
dialect: literalType("postgresql"),
|
4792
|
-
tables: recordType(stringType(), tableSquashed2),
|
4793
|
-
enums: recordType(stringType(), enumSchema),
|
4794
|
-
schemas: recordType(stringType(), stringType())
|
4795
|
-
}).strict();
|
4796
4731
|
pgSchemaSquashed = objectType({
|
4797
|
-
version: literalType("
|
4732
|
+
version: literalType("6"),
|
4798
4733
|
dialect: literalType("postgresql"),
|
4799
4734
|
tables: recordType(stringType(), tableSquashed2),
|
4800
4735
|
enums: recordType(stringType(), enumSchema),
|
@@ -4803,13 +4738,8 @@ var init_pgSchema = __esm({
|
|
4803
4738
|
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
4804
4739
|
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
4805
4740
|
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
4806
|
-
pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
4807
4741
|
pgSchema2 = pgSchemaInternal.merge(schemaHash2);
|
4808
|
-
backwardCompatiblePgSchema = unionType([
|
4809
|
-
pgSchemaV5,
|
4810
|
-
pgSchemaV6,
|
4811
|
-
pgSchema2
|
4812
|
-
]);
|
4742
|
+
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema2]);
|
4813
4743
|
dryPg = pgSchema2.parse({
|
4814
4744
|
version: snapshotVersion,
|
4815
4745
|
dialect: "postgresql",
|
@@ -5875,7 +5805,7 @@ var init_pgSerializer = __esm({
|
|
5875
5805
|
}
|
5876
5806
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
5877
5807
|
return {
|
5878
|
-
version: "
|
5808
|
+
version: "6",
|
5879
5809
|
dialect: "postgresql",
|
5880
5810
|
tables: result,
|
5881
5811
|
enums: enumsToReturn,
|
package/utils.js
CHANGED
@@ -1077,7 +1077,7 @@ var info = (msg, greyMsg = "") => {
|
|
1077
1077
|
|
1078
1078
|
// src/global.ts
|
1079
1079
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1080
|
-
var snapshotVersion = "
|
1080
|
+
var snapshotVersion = "6";
|
1081
1081
|
|
1082
1082
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
1083
1083
|
var util;
|
@@ -5076,33 +5076,6 @@ var index2 = objectType({
|
|
5076
5076
|
where: stringType().optional(),
|
5077
5077
|
concurrently: booleanType().default(false)
|
5078
5078
|
}).strict();
|
5079
|
-
var indexV4 = objectType({
|
5080
|
-
name: stringType(),
|
5081
|
-
columns: stringType().array(),
|
5082
|
-
isUnique: booleanType(),
|
5083
|
-
with: recordType(stringType(), stringType()).optional(),
|
5084
|
-
method: stringType().default("btree"),
|
5085
|
-
where: stringType().optional(),
|
5086
|
-
concurrently: booleanType().default(false)
|
5087
|
-
}).strict();
|
5088
|
-
var indexV5 = objectType({
|
5089
|
-
name: stringType(),
|
5090
|
-
columns: stringType().array(),
|
5091
|
-
isUnique: booleanType(),
|
5092
|
-
with: recordType(stringType(), stringType()).optional(),
|
5093
|
-
method: stringType().default("btree"),
|
5094
|
-
where: stringType().optional(),
|
5095
|
-
concurrently: booleanType().default(false)
|
5096
|
-
}).strict();
|
5097
|
-
var indexV6 = objectType({
|
5098
|
-
name: stringType(),
|
5099
|
-
columns: stringType().array(),
|
5100
|
-
isUnique: booleanType(),
|
5101
|
-
with: recordType(stringType(), stringType()).optional(),
|
5102
|
-
method: stringType().default("btree"),
|
5103
|
-
where: stringType().optional(),
|
5104
|
-
concurrently: booleanType().default(false)
|
5105
|
-
}).strict();
|
5106
5079
|
var fk2 = objectType({
|
5107
5080
|
name: stringType(),
|
5108
5081
|
tableFrom: stringType(),
|
@@ -5143,27 +5116,9 @@ var tableV42 = objectType({
|
|
5143
5116
|
name: stringType(),
|
5144
5117
|
schema: stringType(),
|
5145
5118
|
columns: recordType(stringType(), column2),
|
5146
|
-
indexes: recordType(stringType(),
|
5119
|
+
indexes: recordType(stringType(), index2),
|
5147
5120
|
foreignKeys: recordType(stringType(), fk2)
|
5148
5121
|
}).strict();
|
5149
|
-
var tableV6 = objectType({
|
5150
|
-
name: stringType(),
|
5151
|
-
schema: stringType(),
|
5152
|
-
columns: recordType(stringType(), column2),
|
5153
|
-
indexes: recordType(stringType(), indexV6),
|
5154
|
-
foreignKeys: recordType(stringType(), fk2),
|
5155
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5156
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5157
|
-
}).strict();
|
5158
|
-
var tableV5 = objectType({
|
5159
|
-
name: stringType(),
|
5160
|
-
schema: stringType(),
|
5161
|
-
columns: recordType(stringType(), column2),
|
5162
|
-
indexes: recordType(stringType(), indexV5),
|
5163
|
-
foreignKeys: recordType(stringType(), fk2),
|
5164
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5165
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5166
|
-
}).strict();
|
5167
5122
|
var table2 = objectType({
|
5168
5123
|
name: stringType(),
|
5169
5124
|
schema: stringType(),
|
@@ -5208,7 +5163,7 @@ var pgSchemaInternalV4 = objectType({
|
|
5208
5163
|
var pgSchemaInternalV5 = objectType({
|
5209
5164
|
version: literalType("5"),
|
5210
5165
|
dialect: literalType("pg"),
|
5211
|
-
tables: recordType(stringType(),
|
5166
|
+
tables: recordType(stringType(), table2),
|
5212
5167
|
enums: recordType(stringType(), enumSchemaV1),
|
5213
5168
|
schemas: recordType(stringType(), stringType()),
|
5214
5169
|
_meta: objectType({
|
@@ -5218,19 +5173,6 @@ var pgSchemaInternalV5 = objectType({
|
|
5218
5173
|
}),
|
5219
5174
|
internal: kitInternals2
|
5220
5175
|
}).strict();
|
5221
|
-
var pgSchemaInternalV6 = objectType({
|
5222
|
-
version: literalType("6"),
|
5223
|
-
dialect: literalType("postgresql"),
|
5224
|
-
tables: recordType(stringType(), tableV6),
|
5225
|
-
enums: recordType(stringType(), enumSchema),
|
5226
|
-
schemas: recordType(stringType(), stringType()),
|
5227
|
-
_meta: objectType({
|
5228
|
-
schemas: recordType(stringType(), stringType()),
|
5229
|
-
tables: recordType(stringType(), stringType()),
|
5230
|
-
columns: recordType(stringType(), stringType())
|
5231
|
-
}),
|
5232
|
-
internal: kitInternals2
|
5233
|
-
}).strict();
|
5234
5176
|
var pgSchemaExternal = objectType({
|
5235
5177
|
version: literalType("5"),
|
5236
5178
|
dialect: literalType("pg"),
|
@@ -5244,7 +5186,7 @@ var pgSchemaExternal = objectType({
|
|
5244
5186
|
})
|
5245
5187
|
}).strict();
|
5246
5188
|
var pgSchemaInternal = objectType({
|
5247
|
-
version: literalType("
|
5189
|
+
version: literalType("6"),
|
5248
5190
|
dialect: literalType("postgresql"),
|
5249
5191
|
tables: recordType(stringType(), table2),
|
5250
5192
|
enums: recordType(stringType(), enumSchema),
|
@@ -5279,15 +5221,8 @@ var pgSchemaSquashedV4 = objectType({
|
|
5279
5221
|
enums: recordType(stringType(), enumSchemaV1),
|
5280
5222
|
schemas: recordType(stringType(), stringType())
|
5281
5223
|
}).strict();
|
5282
|
-
var pgSchemaSquashedV6 = objectType({
|
5283
|
-
version: literalType("6"),
|
5284
|
-
dialect: literalType("postgresql"),
|
5285
|
-
tables: recordType(stringType(), tableSquashed2),
|
5286
|
-
enums: recordType(stringType(), enumSchema),
|
5287
|
-
schemas: recordType(stringType(), stringType())
|
5288
|
-
}).strict();
|
5289
5224
|
var pgSchemaSquashed = objectType({
|
5290
|
-
version: literalType("
|
5225
|
+
version: literalType("6"),
|
5291
5226
|
dialect: literalType("postgresql"),
|
5292
5227
|
tables: recordType(stringType(), tableSquashed2),
|
5293
5228
|
enums: recordType(stringType(), enumSchema),
|
@@ -5296,13 +5231,8 @@ var pgSchemaSquashed = objectType({
|
|
5296
5231
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5297
5232
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5298
5233
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5299
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5300
5234
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5301
|
-
var backwardCompatiblePgSchema = unionType([
|
5302
|
-
pgSchemaV5,
|
5303
|
-
pgSchemaV6,
|
5304
|
-
pgSchema
|
5305
|
-
]);
|
5235
|
+
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
5306
5236
|
var dryPg = pgSchema.parse({
|
5307
5237
|
version: snapshotVersion,
|
5308
5238
|
dialect: "postgresql",
|
@@ -5480,7 +5410,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5480
5410
|
var validatorForDialect = (dialect3) => {
|
5481
5411
|
switch (dialect3) {
|
5482
5412
|
case "postgresql":
|
5483
|
-
return { validator: backwardCompatiblePgSchema, version:
|
5413
|
+
return { validator: backwardCompatiblePgSchema, version: 6 };
|
5484
5414
|
case "sqlite":
|
5485
5415
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
5486
5416
|
case "mysql":
|
package/utils.mjs
CHANGED
@@ -1068,7 +1068,7 @@ var info = (msg, greyMsg = "") => {
|
|
1068
1068
|
|
1069
1069
|
// src/global.ts
|
1070
1070
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1071
|
-
var snapshotVersion = "
|
1071
|
+
var snapshotVersion = "6";
|
1072
1072
|
|
1073
1073
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
1074
1074
|
var util;
|
@@ -5067,33 +5067,6 @@ var index2 = objectType({
|
|
5067
5067
|
where: stringType().optional(),
|
5068
5068
|
concurrently: booleanType().default(false)
|
5069
5069
|
}).strict();
|
5070
|
-
var indexV4 = objectType({
|
5071
|
-
name: stringType(),
|
5072
|
-
columns: stringType().array(),
|
5073
|
-
isUnique: booleanType(),
|
5074
|
-
with: recordType(stringType(), stringType()).optional(),
|
5075
|
-
method: stringType().default("btree"),
|
5076
|
-
where: stringType().optional(),
|
5077
|
-
concurrently: booleanType().default(false)
|
5078
|
-
}).strict();
|
5079
|
-
var indexV5 = objectType({
|
5080
|
-
name: stringType(),
|
5081
|
-
columns: stringType().array(),
|
5082
|
-
isUnique: booleanType(),
|
5083
|
-
with: recordType(stringType(), stringType()).optional(),
|
5084
|
-
method: stringType().default("btree"),
|
5085
|
-
where: stringType().optional(),
|
5086
|
-
concurrently: booleanType().default(false)
|
5087
|
-
}).strict();
|
5088
|
-
var indexV6 = objectType({
|
5089
|
-
name: stringType(),
|
5090
|
-
columns: stringType().array(),
|
5091
|
-
isUnique: booleanType(),
|
5092
|
-
with: recordType(stringType(), stringType()).optional(),
|
5093
|
-
method: stringType().default("btree"),
|
5094
|
-
where: stringType().optional(),
|
5095
|
-
concurrently: booleanType().default(false)
|
5096
|
-
}).strict();
|
5097
5070
|
var fk2 = objectType({
|
5098
5071
|
name: stringType(),
|
5099
5072
|
tableFrom: stringType(),
|
@@ -5134,27 +5107,9 @@ var tableV42 = objectType({
|
|
5134
5107
|
name: stringType(),
|
5135
5108
|
schema: stringType(),
|
5136
5109
|
columns: recordType(stringType(), column2),
|
5137
|
-
indexes: recordType(stringType(),
|
5110
|
+
indexes: recordType(stringType(), index2),
|
5138
5111
|
foreignKeys: recordType(stringType(), fk2)
|
5139
5112
|
}).strict();
|
5140
|
-
var tableV6 = objectType({
|
5141
|
-
name: stringType(),
|
5142
|
-
schema: stringType(),
|
5143
|
-
columns: recordType(stringType(), column2),
|
5144
|
-
indexes: recordType(stringType(), indexV6),
|
5145
|
-
foreignKeys: recordType(stringType(), fk2),
|
5146
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5147
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5148
|
-
}).strict();
|
5149
|
-
var tableV5 = objectType({
|
5150
|
-
name: stringType(),
|
5151
|
-
schema: stringType(),
|
5152
|
-
columns: recordType(stringType(), column2),
|
5153
|
-
indexes: recordType(stringType(), indexV5),
|
5154
|
-
foreignKeys: recordType(stringType(), fk2),
|
5155
|
-
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5156
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5157
|
-
}).strict();
|
5158
5113
|
var table2 = objectType({
|
5159
5114
|
name: stringType(),
|
5160
5115
|
schema: stringType(),
|
@@ -5199,7 +5154,7 @@ var pgSchemaInternalV4 = objectType({
|
|
5199
5154
|
var pgSchemaInternalV5 = objectType({
|
5200
5155
|
version: literalType("5"),
|
5201
5156
|
dialect: literalType("pg"),
|
5202
|
-
tables: recordType(stringType(),
|
5157
|
+
tables: recordType(stringType(), table2),
|
5203
5158
|
enums: recordType(stringType(), enumSchemaV1),
|
5204
5159
|
schemas: recordType(stringType(), stringType()),
|
5205
5160
|
_meta: objectType({
|
@@ -5209,19 +5164,6 @@ var pgSchemaInternalV5 = objectType({
|
|
5209
5164
|
}),
|
5210
5165
|
internal: kitInternals2
|
5211
5166
|
}).strict();
|
5212
|
-
var pgSchemaInternalV6 = objectType({
|
5213
|
-
version: literalType("6"),
|
5214
|
-
dialect: literalType("postgresql"),
|
5215
|
-
tables: recordType(stringType(), tableV6),
|
5216
|
-
enums: recordType(stringType(), enumSchema),
|
5217
|
-
schemas: recordType(stringType(), stringType()),
|
5218
|
-
_meta: objectType({
|
5219
|
-
schemas: recordType(stringType(), stringType()),
|
5220
|
-
tables: recordType(stringType(), stringType()),
|
5221
|
-
columns: recordType(stringType(), stringType())
|
5222
|
-
}),
|
5223
|
-
internal: kitInternals2
|
5224
|
-
}).strict();
|
5225
5167
|
var pgSchemaExternal = objectType({
|
5226
5168
|
version: literalType("5"),
|
5227
5169
|
dialect: literalType("pg"),
|
@@ -5235,7 +5177,7 @@ var pgSchemaExternal = objectType({
|
|
5235
5177
|
})
|
5236
5178
|
}).strict();
|
5237
5179
|
var pgSchemaInternal = objectType({
|
5238
|
-
version: literalType("
|
5180
|
+
version: literalType("6"),
|
5239
5181
|
dialect: literalType("postgresql"),
|
5240
5182
|
tables: recordType(stringType(), table2),
|
5241
5183
|
enums: recordType(stringType(), enumSchema),
|
@@ -5270,15 +5212,8 @@ var pgSchemaSquashedV4 = objectType({
|
|
5270
5212
|
enums: recordType(stringType(), enumSchemaV1),
|
5271
5213
|
schemas: recordType(stringType(), stringType())
|
5272
5214
|
}).strict();
|
5273
|
-
var pgSchemaSquashedV6 = objectType({
|
5274
|
-
version: literalType("6"),
|
5275
|
-
dialect: literalType("postgresql"),
|
5276
|
-
tables: recordType(stringType(), tableSquashed2),
|
5277
|
-
enums: recordType(stringType(), enumSchema),
|
5278
|
-
schemas: recordType(stringType(), stringType())
|
5279
|
-
}).strict();
|
5280
5215
|
var pgSchemaSquashed = objectType({
|
5281
|
-
version: literalType("
|
5216
|
+
version: literalType("6"),
|
5282
5217
|
dialect: literalType("postgresql"),
|
5283
5218
|
tables: recordType(stringType(), tableSquashed2),
|
5284
5219
|
enums: recordType(stringType(), enumSchema),
|
@@ -5287,13 +5222,8 @@ var pgSchemaSquashed = objectType({
|
|
5287
5222
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5288
5223
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5289
5224
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5290
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5291
5225
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5292
|
-
var backwardCompatiblePgSchema = unionType([
|
5293
|
-
pgSchemaV5,
|
5294
|
-
pgSchemaV6,
|
5295
|
-
pgSchema
|
5296
|
-
]);
|
5226
|
+
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
5297
5227
|
var dryPg = pgSchema.parse({
|
5298
5228
|
version: snapshotVersion,
|
5299
5229
|
dialect: "postgresql",
|
@@ -5471,7 +5401,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5471
5401
|
var validatorForDialect = (dialect3) => {
|
5472
5402
|
switch (dialect3) {
|
5473
5403
|
case "postgresql":
|
5474
|
-
return { validator: backwardCompatiblePgSchema, version:
|
5404
|
+
return { validator: backwardCompatiblePgSchema, version: 6 };
|
5475
5405
|
case "sqlite":
|
5476
5406
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
5477
5407
|
case "mysql":
|