drizzle-kit 0.22.0-29f7626 → 0.22.0-3c62a84

Sign up to get free protection for your applications and to get access to all the features.
package/payload.mjs CHANGED
@@ -8005,7 +8005,16 @@ var init_mysqlSchema = __esm({
8005
8005
  object({ isDefaultAnExpression: boolean().optional() }).optional()
8006
8006
  )
8007
8007
  }).optional()
8008
- )
8008
+ ).optional(),
8009
+ indexes: record(
8010
+ string(),
8011
+ object({
8012
+ columns: record(
8013
+ string(),
8014
+ object({ isExpression: boolean().optional() }).optional()
8015
+ )
8016
+ }).optional()
8017
+ ).optional()
8009
8018
  }).optional();
8010
8019
  dialect = literal("mysql");
8011
8020
  schemaHash = object({
@@ -8690,7 +8699,7 @@ import {
8690
8699
  literal as literal3,
8691
8700
  union as union4
8692
8701
  } from "zod";
8693
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
8702
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals3, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
8694
8703
  var init_sqliteSchema = __esm({
8695
8704
  "src/serializer/sqliteSchema.ts"() {
8696
8705
  "use strict";
@@ -8767,6 +8776,17 @@ var init_sqliteSchema = __esm({
8767
8776
  columns: record3(string3(), string3())
8768
8777
  })
8769
8778
  }).strict();
8779
+ kitInternals3 = object3({
8780
+ indexes: record3(
8781
+ string3(),
8782
+ object3({
8783
+ columns: record3(
8784
+ string3(),
8785
+ object3({ isExpression: boolean3().optional() }).optional()
8786
+ )
8787
+ }).optional()
8788
+ ).optional()
8789
+ }).optional();
8770
8790
  latestVersion = literal3("6");
8771
8791
  schemaInternal2 = object3({
8772
8792
  version: latestVersion,
@@ -8776,7 +8796,8 @@ var init_sqliteSchema = __esm({
8776
8796
  _meta: object3({
8777
8797
  tables: record3(string3(), string3()),
8778
8798
  columns: record3(string3(), string3())
8779
- })
8799
+ }),
8800
+ internal: kitInternals3
8780
8801
  }).strict();
8781
8802
  schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
8782
8803
  schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
@@ -12140,7 +12161,7 @@ var init_jsonStatements = __esm({
12140
12161
  uniqueConstraints: Object.values(uniqueConstraints)
12141
12162
  };
12142
12163
  };
12143
- prepareMySqlCreateTableJson = (table4, json2) => {
12164
+ prepareMySqlCreateTableJson = (table4, json2, internals) => {
12144
12165
  const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints } = table4;
12145
12166
  return {
12146
12167
  type: "create_table",
@@ -12149,7 +12170,8 @@ var init_jsonStatements = __esm({
12149
12170
  columns: Object.values(columns),
12150
12171
  compositePKs: Object.values(compositePrimaryKeys),
12151
12172
  compositePkName: Object.values(compositePrimaryKeys).length > 0 ? json2.tables[name2].compositePrimaryKeys[MySqlSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0]).name].name : "",
12152
- uniqueConstraints: Object.values(uniqueConstraints)
12173
+ uniqueConstraints: Object.values(uniqueConstraints),
12174
+ internals
12153
12175
  };
12154
12176
  };
12155
12177
  prepareSQLiteCreateTable = (table4) => {
@@ -12903,13 +12925,14 @@ var init_jsonStatements = __esm({
12903
12925
  };
12904
12926
  });
12905
12927
  };
12906
- prepareCreateIndexesJson = (tableName, schema4, indexes) => {
12928
+ prepareCreateIndexesJson = (tableName, schema4, indexes, internal) => {
12907
12929
  return Object.values(indexes).map((indexData) => {
12908
12930
  return {
12909
12931
  type: "create_index",
12910
12932
  tableName,
12911
12933
  data: indexData,
12912
- schema: schema4
12934
+ schema: schema4,
12935
+ internal
12913
12936
  };
12914
12937
  });
12915
12938
  };
@@ -13857,7 +13880,12 @@ var init_snapshotsDiffer = __esm({
13857
13880
  const typedResult = diffResultSchemeMysql.parse(diffResult);
13858
13881
  const jsonStatements = [];
13859
13882
  const jsonCreateIndexesForCreatedTables = createdTables.map((it) => {
13860
- return prepareCreateIndexesJson(it.name, it.schema, it.indexes);
13883
+ return prepareCreateIndexesJson(
13884
+ it.name,
13885
+ it.schema,
13886
+ it.indexes,
13887
+ curFull.internal
13888
+ );
13861
13889
  }).flat();
13862
13890
  const jsonDropTables = deletedTables.map((it) => {
13863
13891
  return prepareDropTableJson(it);
@@ -13956,7 +13984,8 @@ var init_snapshotsDiffer = __esm({
13956
13984
  return prepareCreateIndexesJson(
13957
13985
  it.name,
13958
13986
  it.schema,
13959
- it.addedIndexes || {}
13987
+ it.addedIndexes || {},
13988
+ curFull.internal
13960
13989
  );
13961
13990
  }).flat();
13962
13991
  const jsonDropIndexesForAllAlteredTables = alteredTables.map((it) => {
@@ -14016,7 +14045,11 @@ var init_snapshotsDiffer = __esm({
14016
14045
  (t) => t.type === "delete_reference"
14017
14046
  );
14018
14047
  const jsonMySqlCreateTables = createdTables.map((it) => {
14019
- return prepareMySqlCreateTableJson(it, curFull);
14048
+ return prepareMySqlCreateTableJson(
14049
+ it,
14050
+ curFull,
14051
+ curFull.internal
14052
+ );
14020
14053
  });
14021
14054
  jsonStatements.push(...jsonMySqlCreateTables);
14022
14055
  jsonStatements.push(...jsonDropTables);
@@ -14056,7 +14089,7 @@ var init_snapshotsDiffer = __esm({
14056
14089
  _meta
14057
14090
  };
14058
14091
  };
14059
- applySqliteSnapshotsDiff = async (json1, json2, tablesResolver2, columnsResolver2) => {
14092
+ applySqliteSnapshotsDiff = async (json1, json2, tablesResolver2, columnsResolver2, prevFull, curFull) => {
14060
14093
  const tablesDiff = diffSchemasOrTables(json1.tables, json2.tables);
14061
14094
  const {
14062
14095
  created: createdTables,
@@ -14136,7 +14169,12 @@ var init_snapshotsDiffer = __esm({
14136
14169
  return prepareSQLiteCreateTable(it);
14137
14170
  });
14138
14171
  const jsonCreateIndexesForCreatedTables = createdTables.map((it) => {
14139
- return prepareCreateIndexesJson(it.name, it.schema, it.indexes);
14172
+ return prepareCreateIndexesJson(
14173
+ it.name,
14174
+ it.schema,
14175
+ it.indexes,
14176
+ curFull.internal
14177
+ );
14140
14178
  }).flat();
14141
14179
  const jsonDropTables = deletedTables.map((it) => {
14142
14180
  return prepareDropTableJson(it);
@@ -14238,7 +14276,8 @@ var init_snapshotsDiffer = __esm({
14238
14276
  return prepareCreateIndexesJson(
14239
14277
  it.name,
14240
14278
  it.schema,
14241
- it.addedIndexes || {}
14279
+ it.addedIndexes || {},
14280
+ curFull.internal
14242
14281
  );
14243
14282
  }).flat();
14244
14283
  const jsonDropIndexesForAllAlteredTables = allAltered.map((it) => {
@@ -14672,7 +14711,14 @@ var init_sqlgenerator = __esm({
14672
14711
  return statement.type === "create_table" && dialect7 === "mysql";
14673
14712
  }
14674
14713
  convert(st) {
14675
- const { tableName, columns, schema: schema4, compositePKs, uniqueConstraints } = st;
14714
+ const {
14715
+ tableName,
14716
+ columns,
14717
+ schema: schema4,
14718
+ compositePKs,
14719
+ uniqueConstraints,
14720
+ internals
14721
+ } = st;
14676
14722
  let statement = "";
14677
14723
  statement += `CREATE TABLE \`${tableName}\` (
14678
14724
  `;
@@ -14695,7 +14741,10 @@ var init_sqlgenerator = __esm({
14695
14741
  for (const uniqueConstraint4 of uniqueConstraints) {
14696
14742
  statement += ",\n";
14697
14743
  const unsquashedUnique = MySqlSquasher.unsquashUnique(uniqueConstraint4);
14698
- statement += ` CONSTRAINT \`${unsquashedUnique.name}\` UNIQUE(\`${unsquashedUnique.columns.join(`\`,\``)}\`)`;
14744
+ const uniqueString = unsquashedUnique.columns.map((it) => {
14745
+ return internals?.indexes ? internals?.indexes[unsquashedUnique.name]?.columns[it]?.isExpression ? it : `\`${it}\`` : `\`${it}\``;
14746
+ }).join(",");
14747
+ statement += ` CONSTRAINT \`${unsquashedUnique.name}\` UNIQUE(${uniqueString})`;
14699
14748
  }
14700
14749
  }
14701
14750
  statement += `
@@ -15624,8 +15673,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
15624
15673
  statement.data
15625
15674
  );
15626
15675
  const indexPart = isUnique ? "UNIQUE INDEX" : "INDEX";
15627
- const value = columns.map((it) => `\`${it}\``).join(",");
15628
- return `CREATE ${indexPart} \`${name2}\` ON \`${statement.tableName}\` (${value});`;
15676
+ const uniqueString = columns.map((it) => {
15677
+ return statement.internal?.indexes ? statement.internal?.indexes[name2]?.columns[it]?.isExpression ? it : `\`${it}\`` : `\`${it}\``;
15678
+ }).join(",");
15679
+ return `CREATE ${indexPart} \`${name2}\` ON \`${statement.tableName}\` (${uniqueString});`;
15629
15680
  }
15630
15681
  };
15631
15682
  CreateSqliteIndexConvertor = class extends Convertor {
@@ -15638,8 +15689,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
15638
15689
  );
15639
15690
  const indexPart = isUnique ? "UNIQUE INDEX" : "INDEX";
15640
15691
  const whereStatement = where ? ` WHERE ${where}` : "";
15641
- const value = columns.map((it) => `\`${it}\``).join(",");
15642
- return `CREATE ${indexPart} \`${name2}\` ON \`${statement.tableName}\` (${value})${whereStatement};`;
15692
+ const uniqueString = columns.map((it) => {
15693
+ return statement.internal?.indexes ? statement.internal?.indexes[name2]?.columns[it]?.isExpression ? it : `\`${it}\`` : `\`${it}\``;
15694
+ }).join(",");
15695
+ return `CREATE ${indexPart} \`${name2}\` ON \`${statement.tableName}\` (${uniqueString})${whereStatement};`;
15643
15696
  }
15644
15697
  };
15645
15698
  PgDropIndexConvertor = class extends Convertor {
@@ -19215,6 +19268,7 @@ var init_sqliteSerializer = __esm({
19215
19268
  dialect5 = new SQLiteSyncDialect();
19216
19269
  generateSqliteSnapshot = (tables) => {
19217
19270
  const result = {};
19271
+ const internal = { indexes: {} };
19218
19272
  for (const table4 of tables) {
19219
19273
  const columnsObject = {};
19220
19274
  const indexesObject = {};
@@ -19301,7 +19355,25 @@ ${withStyle.errorWarning(`We've found duplicated unique constraint names in ${so
19301
19355
  const name2 = value.config.name;
19302
19356
  let indexColumns = columns2.map((it) => {
19303
19357
  if (is(it, SQL)) {
19304
- return dialect5.sqlToQuery(it, "indexes").sql;
19358
+ const sql2 = dialect5.sqlToQuery(it, "indexes").sql;
19359
+ if (typeof internal.indexes[name2] === "undefined") {
19360
+ internal.indexes[name2] = {
19361
+ columns: {
19362
+ [sql2]: {
19363
+ isExpression: true
19364
+ }
19365
+ }
19366
+ };
19367
+ } else {
19368
+ if (typeof internal.indexes[name2]?.columns[sql2] === "undefined") {
19369
+ internal.indexes[name2].columns[sql2] = {
19370
+ isExpression: true
19371
+ };
19372
+ } else {
19373
+ internal.indexes[name2].columns[sql2].isExpression = true;
19374
+ }
19375
+ }
19376
+ return sql2;
19305
19377
  } else {
19306
19378
  return it.name;
19307
19379
  }
@@ -19375,7 +19447,8 @@ The unique constraint ${source_default.underline.blue(
19375
19447
  _meta: {
19376
19448
  tables: {},
19377
19449
  columns: {}
19378
- }
19450
+ },
19451
+ internal
19379
19452
  };
19380
19453
  };
19381
19454
  fromDatabase2 = async (db, tablesFilter = (table4) => true, progressCallback) => {
@@ -23637,6 +23710,7 @@ var init_mysqlSerializer = __esm({
23637
23710
  dialect6 = new MySqlDialect();
23638
23711
  generateMySqlSnapshot = (tables) => {
23639
23712
  const result = {};
23713
+ const internal = { tables: {}, indexes: {} };
23640
23714
  for (const table4 of tables) {
23641
23715
  const {
23642
23716
  name: tableName,
@@ -23788,9 +23862,27 @@ The unique constraint ${source_default.underline.blue(
23788
23862
  const name2 = value.config.name;
23789
23863
  let indexColumns = columns2.map((it) => {
23790
23864
  if (is(it, SQL)) {
23791
- return dialect6.sqlToQuery(it, "indexes").sql;
23865
+ const sql2 = dialect6.sqlToQuery(it, "indexes").sql;
23866
+ if (typeof internal.indexes[name2] === "undefined") {
23867
+ internal.indexes[name2] = {
23868
+ columns: {
23869
+ [sql2]: {
23870
+ isExpression: true
23871
+ }
23872
+ }
23873
+ };
23874
+ } else {
23875
+ if (typeof internal.indexes[name2]?.columns[sql2] === "undefined") {
23876
+ internal.indexes[name2].columns[sql2] = {
23877
+ isExpression: true
23878
+ };
23879
+ } else {
23880
+ internal.indexes[name2].columns[sql2].isExpression = true;
23881
+ }
23882
+ }
23883
+ return sql2;
23792
23884
  } else {
23793
- return it.name;
23885
+ return `${it.name}`;
23794
23886
  }
23795
23887
  });
23796
23888
  if (value.config.unique) {
@@ -23857,12 +23949,13 @@ We have encountered a collision between the index name on columns ${source_defau
23857
23949
  _meta: {
23858
23950
  tables: {},
23859
23951
  columns: {}
23860
- }
23952
+ },
23953
+ internal
23861
23954
  };
23862
23955
  };
23863
23956
  fromDatabase3 = async (db, inputSchema, tablesFilter = (table4) => true, progressCallback) => {
23864
23957
  const result = {};
23865
- const internals = { tables: {} };
23958
+ const internals = { tables: {}, indexes: {} };
23866
23959
  const columns = await db.query(`select * from information_schema.columns
23867
23960
  where table_schema = '${inputSchema}' and table_name != '__drizzle_migrations'
23868
23961
  order by table_name, ordinal_position;`);
@@ -25391,7 +25484,9 @@ var generateSQLiteMigration = async (prev, cur) => {
25391
25484
  squashedPrev,
25392
25485
  squashedCur,
25393
25486
  tablesResolver,
25394
- columnsResolver
25487
+ columnsResolver,
25488
+ validatedPrev,
25489
+ validatedCur
25395
25490
  );
25396
25491
  return sqlStatements;
25397
25492
  };
@@ -25420,7 +25515,9 @@ var pushSQLiteSchema = async (imports, drizzleInstance) => {
25420
25515
  squashedPrev,
25421
25516
  squashedCur,
25422
25517
  tablesResolver,
25423
- columnsResolver
25518
+ columnsResolver,
25519
+ validatedPrev,
25520
+ validatedCur
25424
25521
  );
25425
25522
  const { shouldAskForApprove, statementsToExecute, infoToPrint } = await logSuggestionsAndReturn(
25426
25523
  db,
package/utils-studio.js CHANGED
@@ -4918,7 +4918,16 @@ var init_mysqlSchema = __esm({
4918
4918
  objectType({ isDefaultAnExpression: booleanType().optional() }).optional()
4919
4919
  )
4920
4920
  }).optional()
4921
- )
4921
+ ).optional(),
4922
+ indexes: recordType(
4923
+ stringType(),
4924
+ objectType({
4925
+ columns: recordType(
4926
+ stringType(),
4927
+ objectType({ isExpression: booleanType().optional() }).optional()
4928
+ )
4929
+ }).optional()
4930
+ ).optional()
4922
4931
  }).optional();
4923
4932
  dialect = literalType("mysql");
4924
4933
  schemaHash = objectType({
@@ -5338,7 +5347,7 @@ var init_pgSchema = __esm({
5338
5347
  });
5339
5348
 
5340
5349
  // src/serializer/sqliteSchema.ts
5341
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
5350
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals3, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
5342
5351
  var init_sqliteSchema = __esm({
5343
5352
  "src/serializer/sqliteSchema.ts"() {
5344
5353
  "use strict";
@@ -5416,6 +5425,17 @@ var init_sqliteSchema = __esm({
5416
5425
  columns: recordType(stringType(), stringType())
5417
5426
  })
5418
5427
  }).strict();
5428
+ kitInternals3 = objectType({
5429
+ indexes: recordType(
5430
+ stringType(),
5431
+ objectType({
5432
+ columns: recordType(
5433
+ stringType(),
5434
+ objectType({ isExpression: booleanType().optional() }).optional()
5435
+ )
5436
+ }).optional()
5437
+ ).optional()
5438
+ }).optional();
5419
5439
  latestVersion = literalType("6");
5420
5440
  schemaInternal2 = objectType({
5421
5441
  version: latestVersion,
@@ -5425,7 +5445,8 @@ var init_sqliteSchema = __esm({
5425
5445
  _meta: objectType({
5426
5446
  tables: recordType(stringType(), stringType()),
5427
5447
  columns: recordType(stringType(), stringType())
5428
- })
5448
+ }),
5449
+ internal: kitInternals3
5429
5450
  }).strict();
5430
5451
  schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5431
5452
  schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
package/utils-studio.mjs CHANGED
@@ -4919,7 +4919,16 @@ var init_mysqlSchema = __esm({
4919
4919
  objectType({ isDefaultAnExpression: booleanType().optional() }).optional()
4920
4920
  )
4921
4921
  }).optional()
4922
- )
4922
+ ).optional(),
4923
+ indexes: recordType(
4924
+ stringType(),
4925
+ objectType({
4926
+ columns: recordType(
4927
+ stringType(),
4928
+ objectType({ isExpression: booleanType().optional() }).optional()
4929
+ )
4930
+ }).optional()
4931
+ ).optional()
4923
4932
  }).optional();
4924
4933
  dialect = literalType("mysql");
4925
4934
  schemaHash = objectType({
@@ -5339,7 +5348,7 @@ var init_pgSchema = __esm({
5339
5348
  });
5340
5349
 
5341
5350
  // src/serializer/sqliteSchema.ts
5342
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
5351
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals3, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
5343
5352
  var init_sqliteSchema = __esm({
5344
5353
  "src/serializer/sqliteSchema.ts"() {
5345
5354
  "use strict";
@@ -5417,6 +5426,17 @@ var init_sqliteSchema = __esm({
5417
5426
  columns: recordType(stringType(), stringType())
5418
5427
  })
5419
5428
  }).strict();
5429
+ kitInternals3 = objectType({
5430
+ indexes: recordType(
5431
+ stringType(),
5432
+ objectType({
5433
+ columns: recordType(
5434
+ stringType(),
5435
+ objectType({ isExpression: booleanType().optional() }).optional()
5436
+ )
5437
+ }).optional()
5438
+ ).optional()
5439
+ }).optional();
5420
5440
  latestVersion = literalType("6");
5421
5441
  schemaInternal2 = objectType({
5422
5442
  version: latestVersion,
@@ -5426,7 +5446,8 @@ var init_sqliteSchema = __esm({
5426
5446
  _meta: objectType({
5427
5447
  tables: recordType(stringType(), stringType()),
5428
5448
  columns: recordType(stringType(), stringType())
5429
- })
5449
+ }),
5450
+ internal: kitInternals3
5430
5451
  }).strict();
5431
5452
  schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5432
5453
  schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
package/utils.js CHANGED
@@ -4914,7 +4914,16 @@ var kitInternals = objectType({
4914
4914
  objectType({ isDefaultAnExpression: booleanType().optional() }).optional()
4915
4915
  )
4916
4916
  }).optional()
4917
- )
4917
+ ).optional(),
4918
+ indexes: recordType(
4919
+ stringType(),
4920
+ objectType({
4921
+ columns: recordType(
4922
+ stringType(),
4923
+ objectType({ isExpression: booleanType().optional() }).optional()
4924
+ )
4925
+ }).optional()
4926
+ ).optional()
4918
4927
  }).optional();
4919
4928
  var dialect = literalType("mysql");
4920
4929
  var schemaHash = objectType({
@@ -5395,6 +5404,17 @@ var schemaInternalV52 = objectType({
5395
5404
  columns: recordType(stringType(), stringType())
5396
5405
  })
5397
5406
  }).strict();
5407
+ var kitInternals3 = objectType({
5408
+ indexes: recordType(
5409
+ stringType(),
5410
+ objectType({
5411
+ columns: recordType(
5412
+ stringType(),
5413
+ objectType({ isExpression: booleanType().optional() }).optional()
5414
+ )
5415
+ }).optional()
5416
+ ).optional()
5417
+ }).optional();
5398
5418
  var latestVersion = literalType("6");
5399
5419
  var schemaInternal2 = objectType({
5400
5420
  version: latestVersion,
@@ -5404,7 +5424,8 @@ var schemaInternal2 = objectType({
5404
5424
  _meta: objectType({
5405
5425
  tables: recordType(stringType(), stringType()),
5406
5426
  columns: recordType(stringType(), stringType())
5407
- })
5427
+ }),
5428
+ internal: kitInternals3
5408
5429
  }).strict();
5409
5430
  var schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5410
5431
  var schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
package/utils.mjs CHANGED
@@ -4904,7 +4904,16 @@ var kitInternals = objectType({
4904
4904
  objectType({ isDefaultAnExpression: booleanType().optional() }).optional()
4905
4905
  )
4906
4906
  }).optional()
4907
- )
4907
+ ).optional(),
4908
+ indexes: recordType(
4909
+ stringType(),
4910
+ objectType({
4911
+ columns: recordType(
4912
+ stringType(),
4913
+ objectType({ isExpression: booleanType().optional() }).optional()
4914
+ )
4915
+ }).optional()
4916
+ ).optional()
4908
4917
  }).optional();
4909
4918
  var dialect = literalType("mysql");
4910
4919
  var schemaHash = objectType({
@@ -5385,6 +5394,17 @@ var schemaInternalV52 = objectType({
5385
5394
  columns: recordType(stringType(), stringType())
5386
5395
  })
5387
5396
  }).strict();
5397
+ var kitInternals3 = objectType({
5398
+ indexes: recordType(
5399
+ stringType(),
5400
+ objectType({
5401
+ columns: recordType(
5402
+ stringType(),
5403
+ objectType({ isExpression: booleanType().optional() }).optional()
5404
+ )
5405
+ }).optional()
5406
+ ).optional()
5407
+ }).optional();
5388
5408
  var latestVersion = literalType("6");
5389
5409
  var schemaInternal2 = objectType({
5390
5410
  version: latestVersion,
@@ -5394,7 +5414,8 @@ var schemaInternal2 = objectType({
5394
5414
  _meta: objectType({
5395
5415
  tables: recordType(stringType(), stringType()),
5396
5416
  columns: recordType(stringType(), stringType())
5397
- })
5417
+ }),
5418
+ internal: kitInternals3
5398
5419
  }).strict();
5399
5420
  var schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5400
5421
  var schemaV42 = schemaInternalV42.merge(schemaHash3).strict();