drizzle-kit 0.29.0 → 0.30.0-29eb63c

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. package/api.js +91 -59
  2. package/api.mjs +91 -59
  3. package/bin.cjs +70 -99
  4. package/package.json +1 -1
package/api.mjs CHANGED
@@ -5700,8 +5700,8 @@ var init_lib = __esm({
5700
5700
  unknownKeys: "strict",
5701
5701
  ...message !== void 0 ? {
5702
5702
  errorMap: (issue, ctx) => {
5703
- var _a413, _b303, _c13, _d6;
5704
- const defaultError = (_c13 = (_b303 = (_a413 = this._def).errorMap) === null || _b303 === void 0 ? void 0 : _b303.call(_a413, issue, ctx).message) !== null && _c13 !== void 0 ? _c13 : ctx.defaultError;
5703
+ var _a413, _b303, _c14, _d6;
5704
+ const defaultError = (_c14 = (_b303 = (_a413 = this._def).errorMap) === null || _b303 === void 0 ? void 0 : _b303.call(_a413, issue, ctx).message) !== null && _c14 !== void 0 ? _c14 : ctx.defaultError;
5705
5705
  if (issue.code === "unrecognized_keys")
5706
5706
  return {
5707
5707
  message: (_d6 = errorUtil.errToObj(message).message) !== null && _d6 !== void 0 ? _d6 : defaultError
@@ -12336,7 +12336,7 @@ var init_sqlgenerator = __esm({
12336
12336
  const { tableName, schema: schema5, columns, compositePKs, uniqueConstraints, checkConstraints, policies, isRLSEnabled } = st;
12337
12337
  let statement = "";
12338
12338
  const name2 = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
12339
- statement += `CREATE TABLE IF NOT EXISTS ${name2} (
12339
+ statement += `CREATE TABLE ${name2} (
12340
12340
  `;
12341
12341
  for (let i = 0; i < columns.length; i++) {
12342
12342
  const column5 = columns[i];
@@ -13174,7 +13174,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
13174
13174
  convert(statement) {
13175
13175
  const { tableName, columnName, schema: schema5 } = statement;
13176
13176
  const tableNameWithSchema = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
13177
- return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN IF EXISTS "${columnName}";`;
13177
+ return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN "${columnName}";`;
13178
13178
  }
13179
13179
  };
13180
13180
  MySqlAlterTableDropColumnConvertor = class extends Convertor {
@@ -13595,7 +13595,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
13595
13595
  for (const table5 of Object.values(json22.tables)) {
13596
13596
  for (const index5 of Object.values(table5.indexes)) {
13597
13597
  const unsquashed = SQLiteSquasher.unsquashIdx(index5);
13598
- sqlStatements.push(`DROP INDEX IF EXISTS "${unsquashed.name}";`);
13598
+ sqlStatements.push(`DROP INDEX "${unsquashed.name}";`);
13599
13599
  indexes.push({ ...unsquashed, tableName: table5.name });
13600
13600
  }
13601
13601
  }
@@ -14109,13 +14109,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14109
14109
  const toColumnsString = columnsTo.map((it) => `"${it}"`).join(",");
14110
14110
  const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${tableFrom}"` : `"${tableFrom}"`;
14111
14111
  const tableToNameWithSchema = schemaTo ? `"${schemaTo}"."${tableTo}"` : `"${tableTo}"`;
14112
- const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}`;
14113
- let sql2 = "DO $$ BEGIN\n";
14114
- sql2 += " " + alterStatement + ";\n";
14115
- sql2 += "EXCEPTION\n";
14116
- sql2 += " WHEN duplicate_object THEN null;\n";
14117
- sql2 += "END $$;\n";
14118
- return sql2;
14112
+ const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
14113
+ return alterStatement;
14119
14114
  }
14120
14115
  };
14121
14116
  LibSQLCreateForeignKeyConvertor = class extends Convertor {
@@ -14172,12 +14167,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14172
14167
  const toColumnsString = newFk.columnsTo.map((it) => `"${it}"`).join(",");
14173
14168
  const tableFromNameWithSchema = oldFk.schemaTo ? `"${oldFk.schemaTo}"."${oldFk.tableFrom}"` : `"${oldFk.tableFrom}"`;
14174
14169
  const tableToNameWithSchema = newFk.schemaTo ? `"${newFk.schemaTo}"."${newFk.tableFrom}"` : `"${newFk.tableFrom}"`;
14175
- const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}`;
14176
- sql2 += "DO $$ BEGIN\n";
14177
- sql2 += " " + alterStatement + ";\n";
14178
- sql2 += "EXCEPTION\n";
14179
- sql2 += " WHEN duplicate_object THEN null;\n";
14180
- sql2 += "END $$;\n";
14170
+ const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
14171
+ sql2 += alterStatement;
14181
14172
  return sql2;
14182
14173
  }
14183
14174
  };
@@ -14233,7 +14224,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14233
14224
  reversedString = reversedString.slice(0, -1);
14234
14225
  return reversedString;
14235
14226
  }
14236
- return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""} IF NOT EXISTS "${name2}" ON ${tableNameWithSchema} USING ${method} (${value})${Object.keys(withMap).length !== 0 ? ` WITH (${reverseLogic(withMap)})` : ""}${where ? ` WHERE ${where}` : ""};`;
14227
+ return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""} "${name2}" ON ${tableNameWithSchema} USING ${method} (${value})${Object.keys(withMap).length !== 0 ? ` WITH (${reverseLogic(withMap)})` : ""}${where ? ` WHERE ${where}` : ""};`;
14237
14228
  }
14238
14229
  };
14239
14230
  CreateMySqlIndexConvertor = class extends Convertor {
@@ -14288,7 +14279,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14288
14279
  }
14289
14280
  convert(statement) {
14290
14281
  const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
14291
- return `DROP INDEX IF EXISTS "${name2}";`;
14282
+ return `DROP INDEX "${name2}";`;
14292
14283
  }
14293
14284
  };
14294
14285
  PgCreateSchemaConvertor = class extends Convertor {
@@ -14359,7 +14350,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14359
14350
  }
14360
14351
  convert(statement) {
14361
14352
  const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
14362
- return `DROP INDEX IF EXISTS \`${name2}\`;`;
14353
+ return `DROP INDEX \`${name2}\`;`;
14363
14354
  }
14364
14355
  };
14365
14356
  MySqlDropIndexConvertor = class extends Convertor {
@@ -21988,7 +21979,7 @@ var version;
21988
21979
  var init_version = __esm({
21989
21980
  "../drizzle-orm/dist/version.js"() {
21990
21981
  "use strict";
21991
- version = "0.37.0";
21982
+ version = "0.38.0";
21992
21983
  }
21993
21984
  });
21994
21985
 
@@ -22173,7 +22164,10 @@ function fillPlaceholders(params, values) {
22173
22164
  return p;
22174
22165
  });
22175
22166
  }
22176
- var _a19, FakePrimitiveParam, _a20, StringChunk, _a21, _SQL, SQL, _a22, Name, noopDecoder, noopEncoder, noopMapper, _a23, Param, _a24, Placeholder, _a25, _b10, View3;
22167
+ function isView(view4) {
22168
+ return typeof view4 === "object" && view4 !== null && IsDrizzleView in view4;
22169
+ }
22170
+ var _a19, FakePrimitiveParam, _a20, StringChunk, _a21, _SQL, SQL, _a22, Name, noopDecoder, noopEncoder, noopMapper, _a23, Param, _a24, Placeholder, IsDrizzleView, _a25, _b10, _c2, View3;
22177
22171
  var init_sql = __esm({
22178
22172
  "../drizzle-orm/dist/sql/sql.js"() {
22179
22173
  "use strict";
@@ -22498,11 +22492,14 @@ var init_sql = __esm({
22498
22492
  }
22499
22493
  };
22500
22494
  __publicField(Placeholder, _a24, "Placeholder");
22501
- _b10 = entityKind, _a25 = ViewBaseConfig;
22495
+ IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");
22496
+ _c2 = entityKind, _b10 = ViewBaseConfig, _a25 = IsDrizzleView;
22502
22497
  View3 = class {
22503
22498
  constructor({ name: name2, schema: schema5, selectedFields, query }) {
22504
22499
  /** @internal */
22505
- __publicField(this, _a25);
22500
+ __publicField(this, _b10);
22501
+ /** @internal */
22502
+ __publicField(this, _a25, true);
22506
22503
  this[ViewBaseConfig] = {
22507
22504
  name: name2,
22508
22505
  originalName: name2,
@@ -22517,7 +22514,7 @@ var init_sql = __esm({
22517
22514
  return new SQL([this]);
22518
22515
  }
22519
22516
  };
22520
- __publicField(View3, _b10, "View");
22517
+ __publicField(View3, _c2, "View");
22521
22518
  Column2.prototype.getSQL = function() {
22522
22519
  return new SQL([this]);
22523
22520
  };
@@ -23038,6 +23035,9 @@ function applyMixins(baseClass, extendedClasses) {
23038
23035
  function getTableColumns(table5) {
23039
23036
  return table5[Table2.Symbol.Columns];
23040
23037
  }
23038
+ function getViewSelectedFields(view4) {
23039
+ return view4[ViewBaseConfig].selectedFields;
23040
+ }
23041
23041
  function getTableLikeName(table5) {
23042
23042
  return is(table5, Subquery) ? table5._.alias : is(table5, View3) ? table5[ViewBaseConfig].name : is(table5, SQL) ? void 0 : table5[Table2.Symbol.IsAlias] ? table5[Table2.Symbol.Name] : table5[Table2.Symbol.BaseName];
23043
23043
  }
@@ -23332,7 +23332,10 @@ var init_char = __esm({
23332
23332
  }
23333
23333
  /** @internal */
23334
23334
  build(table5) {
23335
- return new PgChar(table5, this.config);
23335
+ return new PgChar(
23336
+ table5,
23337
+ this.config
23338
+ );
23336
23339
  }
23337
23340
  };
23338
23341
  __publicField(PgCharBuilder, _a46, "PgCharBuilder");
@@ -24464,7 +24467,10 @@ var init_varchar = __esm({
24464
24467
  }
24465
24468
  /** @internal */
24466
24469
  build(table5) {
24467
- return new PgVarchar(table5, this.config);
24470
+ return new PgVarchar(
24471
+ table5,
24472
+ this.config
24473
+ );
24468
24474
  }
24469
24475
  };
24470
24476
  __publicField(PgVarcharBuilder, _a105, "PgVarcharBuilder");
@@ -24624,7 +24630,10 @@ var init_vector = __esm({
24624
24630
  }
24625
24631
  /** @internal */
24626
24632
  build(table5) {
24627
- return new PgVector(table5, this.config);
24633
+ return new PgVector(
24634
+ table5,
24635
+ this.config
24636
+ );
24628
24637
  }
24629
24638
  };
24630
24639
  __publicField(PgVectorBuilder, _a113, "PgVectorBuilder");
@@ -24756,7 +24765,7 @@ function pgTableWithSchema(name2, columns, extraConfig, schema5, baseName = name
24756
24765
  }
24757
24766
  });
24758
24767
  }
24759
- var InlineForeignKeys, EnableRLS, _a115, _b94, _c2, _d2, _e2, PgTable, pgTable;
24768
+ var InlineForeignKeys, EnableRLS, _a115, _b94, _c3, _d2, _e2, PgTable, pgTable;
24760
24769
  var init_table2 = __esm({
24761
24770
  "../drizzle-orm/dist/pg-core/table.js"() {
24762
24771
  "use strict";
@@ -24765,11 +24774,11 @@ var init_table2 = __esm({
24765
24774
  init_all();
24766
24775
  InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
24767
24776
  EnableRLS = Symbol.for("drizzle:EnableRLS");
24768
- PgTable = class extends (_e2 = Table2, _d2 = entityKind, _c2 = InlineForeignKeys, _b94 = EnableRLS, _a115 = Table2.Symbol.ExtraConfigBuilder, _e2) {
24777
+ PgTable = class extends (_e2 = Table2, _d2 = entityKind, _c3 = InlineForeignKeys, _b94 = EnableRLS, _a115 = Table2.Symbol.ExtraConfigBuilder, _e2) {
24769
24778
  constructor() {
24770
24779
  super(...arguments);
24771
24780
  /**@internal */
24772
- __publicField(this, _c2, []);
24781
+ __publicField(this, _c3, []);
24773
24782
  /** @internal */
24774
24783
  __publicField(this, _b94, false);
24775
24784
  /** @internal */
@@ -25284,6 +25293,7 @@ __export(dist_exports, {
25284
25293
  getTableLikeName: () => getTableLikeName,
25285
25294
  getTableName: () => getTableName,
25286
25295
  getTableUniqueName: () => getTableUniqueName,
25296
+ getViewSelectedFields: () => getViewSelectedFields,
25287
25297
  gt: () => gt,
25288
25298
  gte: () => gte,
25289
25299
  hammingDistance: () => hammingDistance,
@@ -25299,6 +25309,7 @@ __export(dist_exports, {
25299
25309
  isNull: () => isNull,
25300
25310
  isSQLWrapper: () => isSQLWrapper,
25301
25311
  isTable: () => isTable,
25312
+ isView: () => isView,
25302
25313
  jaccardDistance: () => jaccardDistance,
25303
25314
  l1Distance: () => l1Distance,
25304
25315
  l2Distance: () => l2Distance,
@@ -28148,13 +28159,13 @@ var init_query_builders = __esm({
28148
28159
  });
28149
28160
 
28150
28161
  // ../drizzle-orm/dist/pg-core/query-builders/count.js
28151
- var _a139, _b104, _c3, _PgCountBuilder, PgCountBuilder;
28162
+ var _a139, _b104, _c4, _PgCountBuilder, PgCountBuilder;
28152
28163
  var init_count = __esm({
28153
28164
  "../drizzle-orm/dist/pg-core/query-builders/count.js"() {
28154
28165
  "use strict";
28155
28166
  init_entity();
28156
28167
  init_sql();
28157
- _PgCountBuilder = class _PgCountBuilder extends (_c3 = SQL, _b104 = entityKind, _a139 = Symbol.toStringTag, _c3) {
28168
+ _PgCountBuilder = class _PgCountBuilder extends (_c4 = SQL, _b104 = entityKind, _a139 = Symbol.toStringTag, _c4) {
28158
28169
  constructor(params) {
28159
28170
  super(_PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
28160
28171
  __publicField(this, "sql");
@@ -28893,7 +28904,7 @@ function isPgView(obj) {
28893
28904
  function isPgMaterializedView(obj) {
28894
28905
  return is(obj, PgMaterializedView);
28895
28906
  }
28896
- var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111, _c4, PgView2, PgMaterializedViewConfig, _a157, _b112, _c5, PgMaterializedView;
28907
+ var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111, _c5, PgView2, PgMaterializedViewConfig, _a157, _b112, _c6, PgMaterializedView;
28897
28908
  var init_view = __esm({
28898
28909
  "../drizzle-orm/dist/pg-core/view.js"() {
28899
28910
  "use strict";
@@ -29103,7 +29114,7 @@ var init_view = __esm({
29103
29114
  }
29104
29115
  };
29105
29116
  __publicField(ManualMaterializedViewBuilder, _a155, "PgManualMaterializedViewBuilder");
29106
- PgView2 = class extends (_c4 = PgViewBase, _b111 = entityKind, _a156 = PgViewConfig, _c4) {
29117
+ PgView2 = class extends (_c5 = PgViewBase, _b111 = entityKind, _a156 = PgViewConfig, _c5) {
29107
29118
  constructor({ pgConfig, config }) {
29108
29119
  super(config);
29109
29120
  __publicField(this, _a156);
@@ -29116,7 +29127,7 @@ var init_view = __esm({
29116
29127
  };
29117
29128
  __publicField(PgView2, _b111, "PgView");
29118
29129
  PgMaterializedViewConfig = Symbol.for("drizzle:PgMaterializedViewConfig");
29119
- PgMaterializedView = class extends (_c5 = PgViewBase, _b112 = entityKind, _a157 = PgMaterializedViewConfig, _c5) {
29130
+ PgMaterializedView = class extends (_c6 = PgViewBase, _b112 = entityKind, _a157 = PgMaterializedViewConfig, _c6) {
29120
29131
  constructor({ pgConfig, config }) {
29121
29132
  super(config);
29122
29133
  __publicField(this, _a157);
@@ -31664,7 +31675,10 @@ var init_text2 = __esm({
31664
31675
  }
31665
31676
  /** @internal */
31666
31677
  build(table5) {
31667
- return new SQLiteText(table5, this.config);
31678
+ return new SQLiteText(
31679
+ table5,
31680
+ this.config
31681
+ );
31668
31682
  }
31669
31683
  };
31670
31684
  __publicField(SQLiteTextBuilder, _a191, "SQLiteTextBuilder");
@@ -31765,7 +31779,7 @@ function sqliteTableBase(name2, columns, extraConfig, schema5, baseName = name2)
31765
31779
  }
31766
31780
  return table5;
31767
31781
  }
31768
- var InlineForeignKeys2, _a195, _b140, _c6, _d3, _e3, SQLiteTable, sqliteTable;
31782
+ var InlineForeignKeys2, _a195, _b140, _c7, _d3, _e3, SQLiteTable, sqliteTable;
31769
31783
  var init_table3 = __esm({
31770
31784
  "../drizzle-orm/dist/sqlite-core/table.js"() {
31771
31785
  "use strict";
@@ -31773,11 +31787,11 @@ var init_table3 = __esm({
31773
31787
  init_table();
31774
31788
  init_all2();
31775
31789
  InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
31776
- SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind, _c6 = Table2.Symbol.Columns, _b140 = InlineForeignKeys2, _a195 = Table2.Symbol.ExtraConfigBuilder, _e3) {
31790
+ SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind, _c7 = Table2.Symbol.Columns, _b140 = InlineForeignKeys2, _a195 = Table2.Symbol.ExtraConfigBuilder, _e3) {
31777
31791
  constructor() {
31778
31792
  super(...arguments);
31779
31793
  /** @internal */
31780
- __publicField(this, _c6);
31794
+ __publicField(this, _c7);
31781
31795
  /** @internal */
31782
31796
  __publicField(this, _b140, []);
31783
31797
  /** @internal */
@@ -33645,13 +33659,13 @@ var init_query_builders2 = __esm({
33645
33659
  });
33646
33660
 
33647
33661
  // ../drizzle-orm/dist/sqlite-core/query-builders/count.js
33648
- var _a209, _b149, _c7, _SQLiteCountBuilder, SQLiteCountBuilder;
33662
+ var _a209, _b149, _c8, _SQLiteCountBuilder, SQLiteCountBuilder;
33649
33663
  var init_count2 = __esm({
33650
33664
  "../drizzle-orm/dist/sqlite-core/query-builders/count.js"() {
33651
33665
  "use strict";
33652
33666
  init_entity();
33653
33667
  init_sql();
33654
- _SQLiteCountBuilder = class _SQLiteCountBuilder extends (_c7 = SQL, _b149 = entityKind, _a209 = Symbol.toStringTag, _c7) {
33668
+ _SQLiteCountBuilder = class _SQLiteCountBuilder extends (_c8 = SQL, _b149 = entityKind, _a209 = Symbol.toStringTag, _c8) {
33655
33669
  constructor(params) {
33656
33670
  super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
33657
33671
  __publicField(this, "sql");
@@ -34423,7 +34437,8 @@ function getTableConfig2(table5) {
34423
34437
  const extraConfigBuilder = table5[SQLiteTable.Symbol.ExtraConfigBuilder];
34424
34438
  if (extraConfigBuilder !== void 0) {
34425
34439
  const extraConfig = extraConfigBuilder(table5[SQLiteTable.Symbol.Columns]);
34426
- for (const builder of Object.values(extraConfig)) {
34440
+ const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
34441
+ for (const builder of Object.values(extraValues)) {
34427
34442
  if (is(builder, IndexBuilder2)) {
34428
34443
  indexes.push(builder.build(table5));
34429
34444
  } else if (is(builder, CheckBuilder2)) {
@@ -36320,6 +36335,18 @@ function text3(a, b = {}) {
36320
36335
  const { name: name2, config } = getColumnNameAndConfig(a, b);
36321
36336
  return new MySqlTextBuilder(name2, "text", config);
36322
36337
  }
36338
+ function tinytext(a, b = {}) {
36339
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
36340
+ return new MySqlTextBuilder(name2, "tinytext", config);
36341
+ }
36342
+ function mediumtext(a, b = {}) {
36343
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
36344
+ return new MySqlTextBuilder(name2, "mediumtext", config);
36345
+ }
36346
+ function longtext(a, b = {}) {
36347
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
36348
+ return new MySqlTextBuilder(name2, "longtext", config);
36349
+ }
36323
36350
  var _a279, _b202, MySqlTextBuilder, _a280, _b203, MySqlText;
36324
36351
  var init_text3 = __esm({
36325
36352
  "../drizzle-orm/dist/mysql-core/columns/text.js"() {
@@ -36679,13 +36706,13 @@ var init_columns3 = __esm({
36679
36706
  });
36680
36707
 
36681
36708
  // ../drizzle-orm/dist/mysql-core/query-builders/count.js
36682
- var _a297, _b220, _c8, _MySqlCountBuilder, MySqlCountBuilder;
36709
+ var _a297, _b220, _c9, _MySqlCountBuilder, MySqlCountBuilder;
36683
36710
  var init_count3 = __esm({
36684
36711
  "../drizzle-orm/dist/mysql-core/query-builders/count.js"() {
36685
36712
  "use strict";
36686
36713
  init_entity();
36687
36714
  init_sql();
36688
- _MySqlCountBuilder = class _MySqlCountBuilder extends (_c8 = SQL, _b220 = entityKind, _a297 = Symbol.toStringTag, _c8) {
36715
+ _MySqlCountBuilder = class _MySqlCountBuilder extends (_c9 = SQL, _b220 = entityKind, _a297 = Symbol.toStringTag, _c9) {
36689
36716
  constructor(params) {
36690
36717
  super(_MySqlCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
36691
36718
  __publicField(this, "sql");
@@ -36861,7 +36888,10 @@ function getMySqlColumnBuilders() {
36861
36888
  tinyint,
36862
36889
  varbinary,
36863
36890
  varchar: varchar2,
36864
- year
36891
+ year,
36892
+ longtext,
36893
+ mediumtext,
36894
+ tinytext
36865
36895
  };
36866
36896
  }
36867
36897
  var init_all3 = __esm({
@@ -36915,7 +36945,7 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema5, baseName = n
36915
36945
  }
36916
36946
  return table5;
36917
36947
  }
36918
- var InlineForeignKeys3, _a299, _b222, _c9, _d4, _e4, MySqlTable, mysqlTable;
36948
+ var InlineForeignKeys3, _a299, _b222, _c10, _d4, _e4, MySqlTable, mysqlTable;
36919
36949
  var init_table4 = __esm({
36920
36950
  "../drizzle-orm/dist/mysql-core/table.js"() {
36921
36951
  "use strict";
@@ -36923,11 +36953,11 @@ var init_table4 = __esm({
36923
36953
  init_table();
36924
36954
  init_all3();
36925
36955
  InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
36926
- MySqlTable = class extends (_e4 = Table2, _d4 = entityKind, _c9 = Table2.Symbol.Columns, _b222 = InlineForeignKeys3, _a299 = Table2.Symbol.ExtraConfigBuilder, _e4) {
36956
+ MySqlTable = class extends (_e4 = Table2, _d4 = entityKind, _c10 = Table2.Symbol.Columns, _b222 = InlineForeignKeys3, _a299 = Table2.Symbol.ExtraConfigBuilder, _e4) {
36927
36957
  constructor() {
36928
36958
  super(...arguments);
36929
36959
  /** @internal */
36930
- __publicField(this, _c9);
36960
+ __publicField(this, _c10);
36931
36961
  /** @internal */
36932
36962
  __publicField(this, _b222, []);
36933
36963
  /** @internal */
@@ -39314,7 +39344,7 @@ function mysqlViewWithSchema(name2, selection, schema5) {
39314
39344
  }
39315
39345
  return new ViewBuilder3(name2, schema5);
39316
39346
  }
39317
- var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231, _c10, MySqlView2;
39347
+ var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231, _c11, MySqlView2;
39318
39348
  var init_view3 = __esm({
39319
39349
  "../drizzle-orm/dist/mysql-core/view.js"() {
39320
39350
  "use strict";
@@ -39419,7 +39449,7 @@ var init_view3 = __esm({
39419
39449
  }
39420
39450
  };
39421
39451
  __publicField(ManualViewBuilder3, _a320, "MySqlManualViewBuilder");
39422
- MySqlView2 = class extends (_c10 = MySqlViewBase, _b231 = entityKind, _a321 = MySqlViewConfig, _c10) {
39452
+ MySqlView2 = class extends (_c11 = MySqlViewBase, _b231 = entityKind, _a321 = MySqlViewConfig, _c11) {
39423
39453
  constructor({ mysqlConfig, config }) {
39424
39454
  super(config);
39425
39455
  __publicField(this, _a321);
@@ -39542,7 +39572,8 @@ function getTableConfig3(table5) {
39542
39572
  const extraConfigBuilder = table5[MySqlTable.Symbol.ExtraConfigBuilder];
39543
39573
  if (extraConfigBuilder !== void 0) {
39544
39574
  const extraConfig = extraConfigBuilder(table5[MySqlTable.Symbol.Columns]);
39545
- for (const builder of Object.values(extraConfig)) {
39575
+ const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
39576
+ for (const builder of Object.values(extraValues)) {
39546
39577
  if (is(builder, IndexBuilder3)) {
39547
39578
  indexes.push(builder.build(table5));
39548
39579
  } else if (is(builder, CheckBuilder3)) {
@@ -42074,13 +42105,13 @@ var init_columns4 = __esm({
42074
42105
  });
42075
42106
 
42076
42107
  // ../drizzle-orm/dist/singlestore-core/query-builders/count.js
42077
- var _a391, _b295, _c11, _SingleStoreCountBuilder, SingleStoreCountBuilder;
42108
+ var _a391, _b295, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
42078
42109
  var init_count4 = __esm({
42079
42110
  "../drizzle-orm/dist/singlestore-core/query-builders/count.js"() {
42080
42111
  "use strict";
42081
42112
  init_entity();
42082
42113
  init_sql();
42083
- _SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c11 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c11) {
42114
+ _SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c12) {
42084
42115
  constructor(params) {
42085
42116
  super(_SingleStoreCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
42086
42117
  __publicField(this, "sql");
@@ -42434,14 +42465,14 @@ function singlestoreTableWithSchema(name2, columns, extraConfig, schema5, baseNa
42434
42465
  }
42435
42466
  return table5;
42436
42467
  }
42437
- var _a395, _b298, _c12, _d5, SingleStoreTable;
42468
+ var _a395, _b298, _c13, _d5, SingleStoreTable;
42438
42469
  var init_table5 = __esm({
42439
42470
  "../drizzle-orm/dist/singlestore-core/table.js"() {
42440
42471
  "use strict";
42441
42472
  init_entity();
42442
42473
  init_table();
42443
42474
  init_all4();
42444
- SingleStoreTable = class extends (_d5 = Table2, _c12 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
42475
+ SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
42445
42476
  constructor() {
42446
42477
  super(...arguments);
42447
42478
  /** @internal */
@@ -42450,7 +42481,7 @@ var init_table5 = __esm({
42450
42481
  __publicField(this, _a395);
42451
42482
  }
42452
42483
  };
42453
- __publicField(SingleStoreTable, _c12, "SingleStoreTable");
42484
+ __publicField(SingleStoreTable, _c13, "SingleStoreTable");
42454
42485
  /** @internal */
42455
42486
  __publicField(SingleStoreTable, "Symbol", Object.assign({}, Table2.Symbol, {}));
42456
42487
  }
@@ -44349,7 +44380,8 @@ function getTableConfig4(table5) {
44349
44380
  const extraConfigBuilder = table5[SingleStoreTable.Symbol.ExtraConfigBuilder];
44350
44381
  if (extraConfigBuilder !== void 0) {
44351
44382
  const extraConfig = extraConfigBuilder(table5[SingleStoreTable.Symbol.Columns]);
44352
- for (const builder of Object.values(extraConfig)) {
44383
+ const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
44384
+ for (const builder of Object.values(extraValues)) {
44353
44385
  if (is(builder, IndexBuilder4)) {
44354
44386
  indexes.push(builder.build(table5));
44355
44387
  } else if (is(builder, UniqueConstraintBuilder4)) {