drizzle-kit 0.21.2-4691a9f → 0.21.2-9c89270

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/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 = "7";
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;
@@ -5051,48 +5051,10 @@ var pgSchemaV1 = objectType({
5051
5051
  tables: recordType(stringType(), tableV1),
5052
5052
  enums: recordType(stringType(), enumSchemaV1)
5053
5053
  }).strict();
5054
- var indexColumn = objectType({
5055
- expression: stringType(),
5056
- isExpression: booleanType(),
5057
- asc: booleanType(),
5058
- nulls: stringType().optional(),
5059
- opclass: stringType().optional()
5060
- });
5061
5054
  var index2 = objectType({
5062
- name: stringType(),
5063
- columns: indexColumn.array(),
5064
- isUnique: booleanType(),
5065
- with: recordType(stringType(), anyType()).optional(),
5066
- method: stringType().default("btree"),
5067
- where: stringType().optional(),
5068
- concurrently: booleanType().default(false)
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
5055
  name: stringType(),
5081
5056
  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)
5057
+ isUnique: booleanType()
5096
5058
  }).strict();
5097
5059
  var fk2 = objectType({
5098
5060
  name: stringType(),
@@ -5134,27 +5096,9 @@ var tableV42 = objectType({
5134
5096
  name: stringType(),
5135
5097
  schema: stringType(),
5136
5098
  columns: recordType(stringType(), column2),
5137
- indexes: recordType(stringType(), indexV4),
5099
+ indexes: recordType(stringType(), index2),
5138
5100
  foreignKeys: recordType(stringType(), fk2)
5139
5101
  }).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
5102
  var table2 = objectType({
5159
5103
  name: stringType(),
5160
5104
  schema: stringType(),
@@ -5199,7 +5143,7 @@ var pgSchemaInternalV4 = objectType({
5199
5143
  var pgSchemaInternalV5 = objectType({
5200
5144
  version: literalType("5"),
5201
5145
  dialect: literalType("pg"),
5202
- tables: recordType(stringType(), tableV5),
5146
+ tables: recordType(stringType(), table2),
5203
5147
  enums: recordType(stringType(), enumSchemaV1),
5204
5148
  schemas: recordType(stringType(), stringType()),
5205
5149
  _meta: objectType({
@@ -5209,19 +5153,6 @@ var pgSchemaInternalV5 = objectType({
5209
5153
  }),
5210
5154
  internal: kitInternals2
5211
5155
  }).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
5156
  var pgSchemaExternal = objectType({
5226
5157
  version: literalType("5"),
5227
5158
  dialect: literalType("pg"),
@@ -5235,7 +5166,7 @@ var pgSchemaExternal = objectType({
5235
5166
  })
5236
5167
  }).strict();
5237
5168
  var pgSchemaInternal = objectType({
5238
- version: literalType("7"),
5169
+ version: literalType("6"),
5239
5170
  dialect: literalType("postgresql"),
5240
5171
  tables: recordType(stringType(), table2),
5241
5172
  enums: recordType(stringType(), enumSchema),
@@ -5270,15 +5201,8 @@ var pgSchemaSquashedV4 = objectType({
5270
5201
  enums: recordType(stringType(), enumSchemaV1),
5271
5202
  schemas: recordType(stringType(), stringType())
5272
5203
  }).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
5204
  var pgSchemaSquashed = objectType({
5281
- version: literalType("7"),
5205
+ version: literalType("6"),
5282
5206
  dialect: literalType("postgresql"),
5283
5207
  tables: recordType(stringType(), tableSquashed2),
5284
5208
  enums: recordType(stringType(), enumSchema),
@@ -5287,13 +5211,8 @@ var pgSchemaSquashed = objectType({
5287
5211
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
5288
5212
  var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
5289
5213
  var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
5290
- var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
5291
5214
  var pgSchema = pgSchemaInternal.merge(schemaHash2);
5292
- var backwardCompatiblePgSchema = unionType([
5293
- pgSchemaV5,
5294
- pgSchemaV6,
5295
- pgSchema
5296
- ]);
5215
+ var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
5297
5216
  var dryPg = pgSchema.parse({
5298
5217
  version: snapshotVersion,
5299
5218
  dialect: "postgresql",
@@ -5471,7 +5390,7 @@ var prepareOutFolder = (out, dialect3) => {
5471
5390
  var validatorForDialect = (dialect3) => {
5472
5391
  switch (dialect3) {
5473
5392
  case "postgresql":
5474
- return { validator: backwardCompatiblePgSchema, version: 7 };
5393
+ return { validator: backwardCompatiblePgSchema, version: 6 };
5475
5394
  case "sqlite":
5476
5395
  return { validator: backwardCompatibleSqliteSchema, version: 6 };
5477
5396
  case "mysql":
@@ -5494,7 +5413,6 @@ var validateWithReport = (snapshots, dialect3) => {
5494
5413
  }
5495
5414
  const result2 = validator.safeParse(raw);
5496
5415
  if (!result2.success) {
5497
- console.error(result2.error);
5498
5416
  accum.malformed.push(it);
5499
5417
  return accum;
5500
5418
  }