drizzle-kit 0.25.0-bab5208 → 0.25.0-cf24be9

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 +109 -21
  2. package/api.mjs +109 -21
  3. package/bin.cjs +146 -57
  4. package/package.json +2 -2
package/api.js CHANGED
@@ -11675,7 +11675,7 @@ function fromJson(statements, dialect4, action, json22) {
11675
11675
  }).filter((it) => it !== "");
11676
11676
  return result;
11677
11677
  }
11678
- var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, AlterTypeAddValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11678
+ var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11679
11679
  var init_sqlgenerator = __esm({
11680
11680
  "src/sqlgenerator.ts"() {
11681
11681
  "use strict";
@@ -12056,20 +12056,22 @@ var init_sqlgenerator = __esm({
12056
12056
  }
12057
12057
  convert(st) {
12058
12058
  const { name: name2, values, schema: schema4 } = st;
12059
- const tableNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12059
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12060
12060
  let valuesStatement = "(";
12061
12061
  valuesStatement += values.map((it) => `'${it}'`).join(", ");
12062
12062
  valuesStatement += ")";
12063
- let statement = "DO $$ BEGIN";
12064
- statement += "\n";
12065
- statement += ` CREATE TYPE ${tableNameWithSchema} AS ENUM${valuesStatement};`;
12066
- statement += "\n";
12067
- statement += "EXCEPTION";
12068
- statement += "\n";
12069
- statement += " WHEN duplicate_object THEN null;";
12070
- statement += "\n";
12071
- statement += "END $$;";
12072
- statement += "\n";
12063
+ let statement = `CREATE TYPE ${enumNameWithSchema} AS ENUM${valuesStatement};`;
12064
+ return statement;
12065
+ }
12066
+ };
12067
+ DropTypeEnumConvertor = class extends Convertor {
12068
+ can(statement) {
12069
+ return statement.type === "drop_type_enum";
12070
+ }
12071
+ convert(st) {
12072
+ const { name: name2, schema: schema4 } = st;
12073
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12074
+ let statement = `DROP TYPE ${enumNameWithSchema};`;
12073
12075
  return statement;
12074
12076
  }
12075
12077
  };
@@ -12078,9 +12080,56 @@ var init_sqlgenerator = __esm({
12078
12080
  return statement.type === "alter_type_add_value";
12079
12081
  }
12080
12082
  convert(st) {
12081
- const { name: name2, schema: schema4, value } = st;
12082
- const schemaPrefix = schema4 && schema4 !== "public" ? `"${schema4}".` : "";
12083
- return `ALTER TYPE ${schemaPrefix}"${name2}" ADD VALUE '${value}';`;
12083
+ const { name: name2, schema: schema4, value, before } = st;
12084
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12085
+ return `ALTER TYPE ${enumNameWithSchema} ADD VALUE '${value}'${before.length ? ` BEFORE '${before}'` : ""};`;
12086
+ }
12087
+ };
12088
+ AlterTypeSetSchemaConvertor = class extends Convertor {
12089
+ can(statement) {
12090
+ return statement.type === "move_type_enum";
12091
+ }
12092
+ convert(st) {
12093
+ const { name: name2, schemaFrom, schemaTo } = st;
12094
+ const enumNameWithSchema = schemaFrom ? `"${schemaFrom}"."${name2}"` : `"${name2}"`;
12095
+ return `ALTER TYPE ${enumNameWithSchema} SET SCHEMA "${schemaTo}";`;
12096
+ }
12097
+ };
12098
+ AlterRenameTypeConvertor = class extends Convertor {
12099
+ can(statement) {
12100
+ return statement.type === "rename_type_enum";
12101
+ }
12102
+ convert(st) {
12103
+ const { nameTo, nameFrom, schema: schema4 } = st;
12104
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${nameFrom}"` : `"${nameFrom}"`;
12105
+ return `ALTER TYPE ${enumNameWithSchema} RENAME TO "${nameTo}";`;
12106
+ }
12107
+ };
12108
+ AlterTypeDropValueConvertor = class extends Convertor {
12109
+ can(statement) {
12110
+ return statement.type === "alter_type_drop_value";
12111
+ }
12112
+ convert(st) {
12113
+ const { columnsWithEnum, name: name2, newValues, schema: schema4 } = st;
12114
+ const statements = [];
12115
+ for (const withEnum of columnsWithEnum) {
12116
+ statements.push(
12117
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE text;`
12118
+ );
12119
+ }
12120
+ statements.push(new DropTypeEnumConvertor().convert({ name: name2, schema: schema4, type: "drop_type_enum" }));
12121
+ statements.push(new CreateTypeEnumConvertor().convert({
12122
+ name: name2,
12123
+ schema: schema4,
12124
+ values: newValues,
12125
+ type: "create_type_enum"
12126
+ }));
12127
+ for (const withEnum of columnsWithEnum) {
12128
+ statements.push(
12129
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE "${schema4}"."${name2}" USING "${withEnum.column}"::"${schema4}"."${name2}";`
12130
+ );
12131
+ }
12132
+ return statements;
12084
12133
  }
12085
12134
  };
12086
12135
  PgDropTableConvertor = class extends Convertor {
@@ -13224,6 +13273,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13224
13273
  convertors.push(new SQLiteRecreateTableConvertor());
13225
13274
  convertors.push(new LibSQLRecreateTableConvertor());
13226
13275
  convertors.push(new CreateTypeEnumConvertor());
13276
+ convertors.push(new DropTypeEnumConvertor());
13277
+ convertors.push(new AlterTypeAddValueConvertor());
13278
+ convertors.push(new AlterTypeSetSchemaConvertor());
13279
+ convertors.push(new AlterRenameTypeConvertor());
13280
+ convertors.push(new AlterTypeDropValueConvertor());
13227
13281
  convertors.push(new CreatePgSequenceConvertor());
13228
13282
  convertors.push(new DropPgSequenceConvertor());
13229
13283
  convertors.push(new RenamePgSequenceConvertor());
@@ -13255,7 +13309,6 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13255
13309
  convertors.push(new PgDropIndexConvertor());
13256
13310
  convertors.push(new SqliteDropIndexConvertor());
13257
13311
  convertors.push(new MySqlDropIndexConvertor());
13258
- convertors.push(new AlterTypeAddValueConvertor());
13259
13312
  convertors.push(new PgAlterTableAlterColumnSetPrimaryKeyConvertor());
13260
13313
  convertors.push(new PgAlterTableAlterColumnDropPrimaryKeyConvertor());
13261
13314
  convertors.push(new PgAlterTableAlterColumnSetNotNullConvertor());
@@ -13556,7 +13609,7 @@ var init_sqlitePushUtils = __esm({
13556
13609
  });
13557
13610
 
13558
13611
  // src/jsonStatements.ts
13559
- var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13612
+ var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumValues, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13560
13613
  var init_jsonStatements = __esm({
13561
13614
  "src/jsonStatements.ts"() {
13562
13615
  "use strict";
@@ -13646,6 +13699,27 @@ var init_jsonStatements = __esm({
13646
13699
  };
13647
13700
  });
13648
13701
  };
13702
+ prepareDropEnumValues = (name2, schema4, removedValues, json22) => {
13703
+ if (!removedValues.length) return [];
13704
+ const affectedColumns = [];
13705
+ for (const tableKey2 in json22.tables) {
13706
+ const table4 = json22.tables[tableKey2];
13707
+ for (const columnKey in table4.columns) {
13708
+ const column4 = table4.columns[columnKey];
13709
+ if (column4.type === name2 && column4.typeSchema === schema4) {
13710
+ affectedColumns.push({ schema: table4.schema || "public", table: table4.name, column: column4.name });
13711
+ }
13712
+ }
13713
+ }
13714
+ return [{
13715
+ type: "alter_type_drop_value",
13716
+ name: name2,
13717
+ schema: schema4,
13718
+ deletedValues: removedValues,
13719
+ newValues: json22.enums[`${schema4}.${name2}`].values,
13720
+ columnsWithEnum: affectedColumns
13721
+ }];
13722
+ };
13649
13723
  prepareDropEnumJson = (name2, schema4) => {
13650
13724
  return {
13651
13725
  type: "drop_type_enum",
@@ -15867,6 +15941,9 @@ var init_snapshotsDiffer = __esm({
15867
15941
  const jsonAlterEnumsWithAddedValues = typedResult.alteredEnums.map((it) => {
15868
15942
  return prepareAddValuesToEnumJson(it.name, it.schema, it.addedValues);
15869
15943
  }).flat() ?? [];
15944
+ const jsonAlterEnumsWithDroppedValues = typedResult.alteredEnums.map((it) => {
15945
+ return prepareDropEnumValues(it.name, it.schema, it.deletedValues, curFull);
15946
+ }).flat() ?? [];
15870
15947
  const createSequences = createdSequences.map((it) => {
15871
15948
  return prepareCreateSequenceJson(it);
15872
15949
  }) ?? [];
@@ -15924,6 +16001,7 @@ var init_snapshotsDiffer = __esm({
15924
16001
  jsonStatements.push(...jsonAlteredCompositePKs);
15925
16002
  jsonStatements.push(...jsonAddedUniqueConstraints);
15926
16003
  jsonStatements.push(...jsonAlteredUniqueConstraints);
16004
+ jsonStatements.push(...jsonAlterEnumsWithDroppedValues);
15927
16005
  jsonStatements.push(...dropEnums);
15928
16006
  jsonStatements.push(...dropSequences);
15929
16007
  jsonStatements.push(...dropSchemas);
@@ -15944,7 +16022,17 @@ var init_snapshotsDiffer = __esm({
15944
16022
  }
15945
16023
  return true;
15946
16024
  });
15947
- const sqlStatements = fromJson(filteredJsonStatements, "postgresql");
16025
+ const filteredEnumsJsonStatements = filteredJsonStatements.filter((st) => {
16026
+ if (st.type === "alter_type_add_value") {
16027
+ if (jsonStatements.find(
16028
+ (it) => it.type === "alter_type_drop_value" && it.name === st.name && it.schema === st.schema
16029
+ )) {
16030
+ return false;
16031
+ }
16032
+ }
16033
+ return true;
16034
+ });
16035
+ const sqlStatements = fromJson(filteredEnumsJsonStatements, "postgresql");
15948
16036
  const uniqueSqlStatements = [];
15949
16037
  sqlStatements.forEach((ss) => {
15950
16038
  if (!uniqueSqlStatements.includes(ss)) {
@@ -15960,7 +16048,7 @@ var init_snapshotsDiffer = __esm({
15960
16048
  });
15961
16049
  const _meta = prepareMigrationMeta(rSchemas, rTables, rColumns);
15962
16050
  return {
15963
- statements: filteredJsonStatements,
16051
+ statements: filteredEnumsJsonStatements,
15964
16052
  sqlStatements: uniqueSqlStatements,
15965
16053
  _meta
15966
16054
  };
@@ -19004,7 +19092,7 @@ var version;
19004
19092
  var init_version = __esm({
19005
19093
  "../drizzle-orm/dist/version.js"() {
19006
19094
  "use strict";
19007
- version = "0.34.0";
19095
+ version = "0.34.1";
19008
19096
  }
19009
19097
  });
19010
19098
 
@@ -26658,7 +26746,7 @@ ${withStyle.errorWarning(
26658
26746
  schema: tableSchema
26659
26747
  } : void 0
26660
26748
  };
26661
- if (identityName) {
26749
+ if (identityName && typeof identityName === "string") {
26662
26750
  delete sequencesToReturn[`${tableSchema}.${identityName.startsWith('"') && identityName.endsWith('"') ? identityName.slice(1, -1) : identityName}`];
26663
26751
  delete sequencesToReturn[identityName];
26664
26752
  }
package/api.mjs CHANGED
@@ -11680,7 +11680,7 @@ function fromJson(statements, dialect4, action, json22) {
11680
11680
  }).filter((it) => it !== "");
11681
11681
  return result;
11682
11682
  }
11683
- var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, AlterTypeAddValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11683
+ var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11684
11684
  var init_sqlgenerator = __esm({
11685
11685
  "src/sqlgenerator.ts"() {
11686
11686
  "use strict";
@@ -12061,20 +12061,22 @@ var init_sqlgenerator = __esm({
12061
12061
  }
12062
12062
  convert(st) {
12063
12063
  const { name: name2, values, schema: schema4 } = st;
12064
- const tableNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12064
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12065
12065
  let valuesStatement = "(";
12066
12066
  valuesStatement += values.map((it) => `'${it}'`).join(", ");
12067
12067
  valuesStatement += ")";
12068
- let statement = "DO $$ BEGIN";
12069
- statement += "\n";
12070
- statement += ` CREATE TYPE ${tableNameWithSchema} AS ENUM${valuesStatement};`;
12071
- statement += "\n";
12072
- statement += "EXCEPTION";
12073
- statement += "\n";
12074
- statement += " WHEN duplicate_object THEN null;";
12075
- statement += "\n";
12076
- statement += "END $$;";
12077
- statement += "\n";
12068
+ let statement = `CREATE TYPE ${enumNameWithSchema} AS ENUM${valuesStatement};`;
12069
+ return statement;
12070
+ }
12071
+ };
12072
+ DropTypeEnumConvertor = class extends Convertor {
12073
+ can(statement) {
12074
+ return statement.type === "drop_type_enum";
12075
+ }
12076
+ convert(st) {
12077
+ const { name: name2, schema: schema4 } = st;
12078
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12079
+ let statement = `DROP TYPE ${enumNameWithSchema};`;
12078
12080
  return statement;
12079
12081
  }
12080
12082
  };
@@ -12083,9 +12085,56 @@ var init_sqlgenerator = __esm({
12083
12085
  return statement.type === "alter_type_add_value";
12084
12086
  }
12085
12087
  convert(st) {
12086
- const { name: name2, schema: schema4, value } = st;
12087
- const schemaPrefix = schema4 && schema4 !== "public" ? `"${schema4}".` : "";
12088
- return `ALTER TYPE ${schemaPrefix}"${name2}" ADD VALUE '${value}';`;
12088
+ const { name: name2, schema: schema4, value, before } = st;
12089
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${name2}"` : `"${name2}"`;
12090
+ return `ALTER TYPE ${enumNameWithSchema} ADD VALUE '${value}'${before.length ? ` BEFORE '${before}'` : ""};`;
12091
+ }
12092
+ };
12093
+ AlterTypeSetSchemaConvertor = class extends Convertor {
12094
+ can(statement) {
12095
+ return statement.type === "move_type_enum";
12096
+ }
12097
+ convert(st) {
12098
+ const { name: name2, schemaFrom, schemaTo } = st;
12099
+ const enumNameWithSchema = schemaFrom ? `"${schemaFrom}"."${name2}"` : `"${name2}"`;
12100
+ return `ALTER TYPE ${enumNameWithSchema} SET SCHEMA "${schemaTo}";`;
12101
+ }
12102
+ };
12103
+ AlterRenameTypeConvertor = class extends Convertor {
12104
+ can(statement) {
12105
+ return statement.type === "rename_type_enum";
12106
+ }
12107
+ convert(st) {
12108
+ const { nameTo, nameFrom, schema: schema4 } = st;
12109
+ const enumNameWithSchema = schema4 ? `"${schema4}"."${nameFrom}"` : `"${nameFrom}"`;
12110
+ return `ALTER TYPE ${enumNameWithSchema} RENAME TO "${nameTo}";`;
12111
+ }
12112
+ };
12113
+ AlterTypeDropValueConvertor = class extends Convertor {
12114
+ can(statement) {
12115
+ return statement.type === "alter_type_drop_value";
12116
+ }
12117
+ convert(st) {
12118
+ const { columnsWithEnum, name: name2, newValues, schema: schema4 } = st;
12119
+ const statements = [];
12120
+ for (const withEnum of columnsWithEnum) {
12121
+ statements.push(
12122
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE text;`
12123
+ );
12124
+ }
12125
+ statements.push(new DropTypeEnumConvertor().convert({ name: name2, schema: schema4, type: "drop_type_enum" }));
12126
+ statements.push(new CreateTypeEnumConvertor().convert({
12127
+ name: name2,
12128
+ schema: schema4,
12129
+ values: newValues,
12130
+ type: "create_type_enum"
12131
+ }));
12132
+ for (const withEnum of columnsWithEnum) {
12133
+ statements.push(
12134
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE "${schema4}"."${name2}" USING "${withEnum.column}"::"${schema4}"."${name2}";`
12135
+ );
12136
+ }
12137
+ return statements;
12089
12138
  }
12090
12139
  };
12091
12140
  PgDropTableConvertor = class extends Convertor {
@@ -13229,6 +13278,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13229
13278
  convertors.push(new SQLiteRecreateTableConvertor());
13230
13279
  convertors.push(new LibSQLRecreateTableConvertor());
13231
13280
  convertors.push(new CreateTypeEnumConvertor());
13281
+ convertors.push(new DropTypeEnumConvertor());
13282
+ convertors.push(new AlterTypeAddValueConvertor());
13283
+ convertors.push(new AlterTypeSetSchemaConvertor());
13284
+ convertors.push(new AlterRenameTypeConvertor());
13285
+ convertors.push(new AlterTypeDropValueConvertor());
13232
13286
  convertors.push(new CreatePgSequenceConvertor());
13233
13287
  convertors.push(new DropPgSequenceConvertor());
13234
13288
  convertors.push(new RenamePgSequenceConvertor());
@@ -13260,7 +13314,6 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13260
13314
  convertors.push(new PgDropIndexConvertor());
13261
13315
  convertors.push(new SqliteDropIndexConvertor());
13262
13316
  convertors.push(new MySqlDropIndexConvertor());
13263
- convertors.push(new AlterTypeAddValueConvertor());
13264
13317
  convertors.push(new PgAlterTableAlterColumnSetPrimaryKeyConvertor());
13265
13318
  convertors.push(new PgAlterTableAlterColumnDropPrimaryKeyConvertor());
13266
13319
  convertors.push(new PgAlterTableAlterColumnSetNotNullConvertor());
@@ -13561,7 +13614,7 @@ var init_sqlitePushUtils = __esm({
13561
13614
  });
13562
13615
 
13563
13616
  // src/jsonStatements.ts
13564
- var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13617
+ var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumValues, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13565
13618
  var init_jsonStatements = __esm({
13566
13619
  "src/jsonStatements.ts"() {
13567
13620
  "use strict";
@@ -13651,6 +13704,27 @@ var init_jsonStatements = __esm({
13651
13704
  };
13652
13705
  });
13653
13706
  };
13707
+ prepareDropEnumValues = (name2, schema4, removedValues, json22) => {
13708
+ if (!removedValues.length) return [];
13709
+ const affectedColumns = [];
13710
+ for (const tableKey2 in json22.tables) {
13711
+ const table4 = json22.tables[tableKey2];
13712
+ for (const columnKey in table4.columns) {
13713
+ const column4 = table4.columns[columnKey];
13714
+ if (column4.type === name2 && column4.typeSchema === schema4) {
13715
+ affectedColumns.push({ schema: table4.schema || "public", table: table4.name, column: column4.name });
13716
+ }
13717
+ }
13718
+ }
13719
+ return [{
13720
+ type: "alter_type_drop_value",
13721
+ name: name2,
13722
+ schema: schema4,
13723
+ deletedValues: removedValues,
13724
+ newValues: json22.enums[`${schema4}.${name2}`].values,
13725
+ columnsWithEnum: affectedColumns
13726
+ }];
13727
+ };
13654
13728
  prepareDropEnumJson = (name2, schema4) => {
13655
13729
  return {
13656
13730
  type: "drop_type_enum",
@@ -15872,6 +15946,9 @@ var init_snapshotsDiffer = __esm({
15872
15946
  const jsonAlterEnumsWithAddedValues = typedResult.alteredEnums.map((it) => {
15873
15947
  return prepareAddValuesToEnumJson(it.name, it.schema, it.addedValues);
15874
15948
  }).flat() ?? [];
15949
+ const jsonAlterEnumsWithDroppedValues = typedResult.alteredEnums.map((it) => {
15950
+ return prepareDropEnumValues(it.name, it.schema, it.deletedValues, curFull);
15951
+ }).flat() ?? [];
15875
15952
  const createSequences = createdSequences.map((it) => {
15876
15953
  return prepareCreateSequenceJson(it);
15877
15954
  }) ?? [];
@@ -15929,6 +16006,7 @@ var init_snapshotsDiffer = __esm({
15929
16006
  jsonStatements.push(...jsonAlteredCompositePKs);
15930
16007
  jsonStatements.push(...jsonAddedUniqueConstraints);
15931
16008
  jsonStatements.push(...jsonAlteredUniqueConstraints);
16009
+ jsonStatements.push(...jsonAlterEnumsWithDroppedValues);
15932
16010
  jsonStatements.push(...dropEnums);
15933
16011
  jsonStatements.push(...dropSequences);
15934
16012
  jsonStatements.push(...dropSchemas);
@@ -15949,7 +16027,17 @@ var init_snapshotsDiffer = __esm({
15949
16027
  }
15950
16028
  return true;
15951
16029
  });
15952
- const sqlStatements = fromJson(filteredJsonStatements, "postgresql");
16030
+ const filteredEnumsJsonStatements = filteredJsonStatements.filter((st) => {
16031
+ if (st.type === "alter_type_add_value") {
16032
+ if (jsonStatements.find(
16033
+ (it) => it.type === "alter_type_drop_value" && it.name === st.name && it.schema === st.schema
16034
+ )) {
16035
+ return false;
16036
+ }
16037
+ }
16038
+ return true;
16039
+ });
16040
+ const sqlStatements = fromJson(filteredEnumsJsonStatements, "postgresql");
15953
16041
  const uniqueSqlStatements = [];
15954
16042
  sqlStatements.forEach((ss) => {
15955
16043
  if (!uniqueSqlStatements.includes(ss)) {
@@ -15965,7 +16053,7 @@ var init_snapshotsDiffer = __esm({
15965
16053
  });
15966
16054
  const _meta = prepareMigrationMeta(rSchemas, rTables, rColumns);
15967
16055
  return {
15968
- statements: filteredJsonStatements,
16056
+ statements: filteredEnumsJsonStatements,
15969
16057
  sqlStatements: uniqueSqlStatements,
15970
16058
  _meta
15971
16059
  };
@@ -19009,7 +19097,7 @@ var version;
19009
19097
  var init_version = __esm({
19010
19098
  "../drizzle-orm/dist/version.js"() {
19011
19099
  "use strict";
19012
- version = "0.34.0";
19100
+ version = "0.34.1";
19013
19101
  }
19014
19102
  });
19015
19103
 
@@ -26663,7 +26751,7 @@ ${withStyle.errorWarning(
26663
26751
  schema: tableSchema
26664
26752
  } : void 0
26665
26753
  };
26666
- if (identityName) {
26754
+ if (identityName && typeof identityName === "string") {
26667
26755
  delete sequencesToReturn[`${tableSchema}.${identityName.startsWith('"') && identityName.endsWith('"') ? identityName.slice(1, -1) : identityName}`];
26668
26756
  delete sequencesToReturn[identityName];
26669
26757
  }
package/bin.cjs CHANGED
@@ -19317,7 +19317,7 @@ ${withStyle.errorWarning(
19317
19317
  schema: tableSchema
19318
19318
  } : void 0
19319
19319
  };
19320
- if (identityName) {
19320
+ if (identityName && typeof identityName === "string") {
19321
19321
  delete sequencesToReturn[`${tableSchema}.${identityName.startsWith('"') && identityName.endsWith('"') ? identityName.slice(1, -1) : identityName}`];
19322
19322
  delete sequencesToReturn[identityName];
19323
19323
  }
@@ -23105,7 +23105,7 @@ function fromJson(statements, dialect4, action, json2) {
23105
23105
  }).filter((it) => it !== "");
23106
23106
  return result;
23107
23107
  }
23108
- var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, AlterTypeAddValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
23108
+ var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
23109
23109
  var init_sqlgenerator = __esm({
23110
23110
  "src/sqlgenerator.ts"() {
23111
23111
  "use strict";
@@ -23489,20 +23489,22 @@ var init_sqlgenerator = __esm({
23489
23489
  }
23490
23490
  convert(st) {
23491
23491
  const { name, values, schema: schema5 } = st;
23492
- const tableNameWithSchema = schema5 ? `"${schema5}"."${name}"` : `"${name}"`;
23492
+ const enumNameWithSchema = schema5 ? `"${schema5}"."${name}"` : `"${name}"`;
23493
23493
  let valuesStatement = "(";
23494
23494
  valuesStatement += values.map((it) => `'${it}'`).join(", ");
23495
23495
  valuesStatement += ")";
23496
- let statement = "DO $$ BEGIN";
23497
- statement += "\n";
23498
- statement += ` CREATE TYPE ${tableNameWithSchema} AS ENUM${valuesStatement};`;
23499
- statement += "\n";
23500
- statement += "EXCEPTION";
23501
- statement += "\n";
23502
- statement += " WHEN duplicate_object THEN null;";
23503
- statement += "\n";
23504
- statement += "END $$;";
23505
- statement += "\n";
23496
+ let statement = `CREATE TYPE ${enumNameWithSchema} AS ENUM${valuesStatement};`;
23497
+ return statement;
23498
+ }
23499
+ };
23500
+ DropTypeEnumConvertor = class extends Convertor {
23501
+ can(statement) {
23502
+ return statement.type === "drop_type_enum";
23503
+ }
23504
+ convert(st) {
23505
+ const { name, schema: schema5 } = st;
23506
+ const enumNameWithSchema = schema5 ? `"${schema5}"."${name}"` : `"${name}"`;
23507
+ let statement = `DROP TYPE ${enumNameWithSchema};`;
23506
23508
  return statement;
23507
23509
  }
23508
23510
  };
@@ -23511,9 +23513,56 @@ var init_sqlgenerator = __esm({
23511
23513
  return statement.type === "alter_type_add_value";
23512
23514
  }
23513
23515
  convert(st) {
23514
- const { name, schema: schema5, value } = st;
23515
- const schemaPrefix = schema5 && schema5 !== "public" ? `"${schema5}".` : "";
23516
- return `ALTER TYPE ${schemaPrefix}"${name}" ADD VALUE '${value}';`;
23516
+ const { name, schema: schema5, value, before } = st;
23517
+ const enumNameWithSchema = schema5 ? `"${schema5}"."${name}"` : `"${name}"`;
23518
+ return `ALTER TYPE ${enumNameWithSchema} ADD VALUE '${value}'${before.length ? ` BEFORE '${before}'` : ""};`;
23519
+ }
23520
+ };
23521
+ AlterTypeSetSchemaConvertor = class extends Convertor {
23522
+ can(statement) {
23523
+ return statement.type === "move_type_enum";
23524
+ }
23525
+ convert(st) {
23526
+ const { name, schemaFrom, schemaTo } = st;
23527
+ const enumNameWithSchema = schemaFrom ? `"${schemaFrom}"."${name}"` : `"${name}"`;
23528
+ return `ALTER TYPE ${enumNameWithSchema} SET SCHEMA "${schemaTo}";`;
23529
+ }
23530
+ };
23531
+ AlterRenameTypeConvertor = class extends Convertor {
23532
+ can(statement) {
23533
+ return statement.type === "rename_type_enum";
23534
+ }
23535
+ convert(st) {
23536
+ const { nameTo, nameFrom, schema: schema5 } = st;
23537
+ const enumNameWithSchema = schema5 ? `"${schema5}"."${nameFrom}"` : `"${nameFrom}"`;
23538
+ return `ALTER TYPE ${enumNameWithSchema} RENAME TO "${nameTo}";`;
23539
+ }
23540
+ };
23541
+ AlterTypeDropValueConvertor = class extends Convertor {
23542
+ can(statement) {
23543
+ return statement.type === "alter_type_drop_value";
23544
+ }
23545
+ convert(st) {
23546
+ const { columnsWithEnum, name, newValues, schema: schema5 } = st;
23547
+ const statements = [];
23548
+ for (const withEnum of columnsWithEnum) {
23549
+ statements.push(
23550
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE text;`
23551
+ );
23552
+ }
23553
+ statements.push(new DropTypeEnumConvertor().convert({ name, schema: schema5, type: "drop_type_enum" }));
23554
+ statements.push(new CreateTypeEnumConvertor().convert({
23555
+ name,
23556
+ schema: schema5,
23557
+ values: newValues,
23558
+ type: "create_type_enum"
23559
+ }));
23560
+ for (const withEnum of columnsWithEnum) {
23561
+ statements.push(
23562
+ `ALTER TABLE "${withEnum.schema}"."${withEnum.table}" ALTER COLUMN "${withEnum.column}" SET DATA TYPE "${schema5}"."${name}" USING "${withEnum.column}"::"${schema5}"."${name}";`
23563
+ );
23564
+ }
23565
+ return statements;
23517
23566
  }
23518
23567
  };
23519
23568
  PgDropTableConvertor = class extends Convertor {
@@ -24660,6 +24709,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
24660
24709
  convertors.push(new SQLiteRecreateTableConvertor());
24661
24710
  convertors.push(new LibSQLRecreateTableConvertor());
24662
24711
  convertors.push(new CreateTypeEnumConvertor());
24712
+ convertors.push(new DropTypeEnumConvertor());
24713
+ convertors.push(new AlterTypeAddValueConvertor());
24714
+ convertors.push(new AlterTypeSetSchemaConvertor());
24715
+ convertors.push(new AlterRenameTypeConvertor());
24716
+ convertors.push(new AlterTypeDropValueConvertor());
24663
24717
  convertors.push(new CreatePgSequenceConvertor());
24664
24718
  convertors.push(new DropPgSequenceConvertor());
24665
24719
  convertors.push(new RenamePgSequenceConvertor());
@@ -24691,7 +24745,6 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
24691
24745
  convertors.push(new PgDropIndexConvertor());
24692
24746
  convertors.push(new SqliteDropIndexConvertor());
24693
24747
  convertors.push(new MySqlDropIndexConvertor());
24694
- convertors.push(new AlterTypeAddValueConvertor());
24695
24748
  convertors.push(new PgAlterTableAlterColumnSetPrimaryKeyConvertor());
24696
24749
  convertors.push(new PgAlterTableAlterColumnDropPrimaryKeyConvertor());
24697
24750
  convertors.push(new PgAlterTableAlterColumnSetNotNullConvertor());
@@ -24993,7 +25046,7 @@ var init_sqlitePushUtils = __esm({
24993
25046
  });
24994
25047
 
24995
25048
  // src/jsonStatements.ts
24996
- var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
25049
+ var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumValues, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
24997
25050
  var init_jsonStatements = __esm({
24998
25051
  "src/jsonStatements.ts"() {
24999
25052
  "use strict";
@@ -25083,6 +25136,28 @@ var init_jsonStatements = __esm({
25083
25136
  };
25084
25137
  });
25085
25138
  };
25139
+ prepareDropEnumValues = (name, schema5, removedValues, json2) => {
25140
+ if (!removedValues.length)
25141
+ return [];
25142
+ const affectedColumns = [];
25143
+ for (const tableKey2 in json2.tables) {
25144
+ const table4 = json2.tables[tableKey2];
25145
+ for (const columnKey in table4.columns) {
25146
+ const column7 = table4.columns[columnKey];
25147
+ if (column7.type === name && column7.typeSchema === schema5) {
25148
+ affectedColumns.push({ schema: table4.schema || "public", table: table4.name, column: column7.name });
25149
+ }
25150
+ }
25151
+ }
25152
+ return [{
25153
+ type: "alter_type_drop_value",
25154
+ name,
25155
+ schema: schema5,
25156
+ deletedValues: removedValues,
25157
+ newValues: json2.enums[`${schema5}.${name}`].values,
25158
+ columnsWithEnum: affectedColumns
25159
+ }];
25160
+ };
25086
25161
  prepareDropEnumJson = (name, schema5) => {
25087
25162
  return {
25088
25163
  type: "drop_type_enum",
@@ -27276,6 +27351,9 @@ var init_snapshotsDiffer = __esm({
27276
27351
  const jsonAlterEnumsWithAddedValues = typedResult.alteredEnums.map((it) => {
27277
27352
  return prepareAddValuesToEnumJson(it.name, it.schema, it.addedValues);
27278
27353
  }).flat() ?? [];
27354
+ const jsonAlterEnumsWithDroppedValues = typedResult.alteredEnums.map((it) => {
27355
+ return prepareDropEnumValues(it.name, it.schema, it.deletedValues, curFull);
27356
+ }).flat() ?? [];
27279
27357
  const createSequences = createdSequences.map((it) => {
27280
27358
  return prepareCreateSequenceJson(it);
27281
27359
  }) ?? [];
@@ -27333,6 +27411,7 @@ var init_snapshotsDiffer = __esm({
27333
27411
  jsonStatements.push(...jsonAlteredCompositePKs);
27334
27412
  jsonStatements.push(...jsonAddedUniqueConstraints);
27335
27413
  jsonStatements.push(...jsonAlteredUniqueConstraints);
27414
+ jsonStatements.push(...jsonAlterEnumsWithDroppedValues);
27336
27415
  jsonStatements.push(...dropEnums);
27337
27416
  jsonStatements.push(...dropSequences);
27338
27417
  jsonStatements.push(...dropSchemas);
@@ -27353,7 +27432,17 @@ var init_snapshotsDiffer = __esm({
27353
27432
  }
27354
27433
  return true;
27355
27434
  });
27356
- const sqlStatements = fromJson(filteredJsonStatements, "postgresql");
27435
+ const filteredEnumsJsonStatements = filteredJsonStatements.filter((st) => {
27436
+ if (st.type === "alter_type_add_value") {
27437
+ if (jsonStatements.find(
27438
+ (it) => it.type === "alter_type_drop_value" && it.name === st.name && it.schema === st.schema
27439
+ )) {
27440
+ return false;
27441
+ }
27442
+ }
27443
+ return true;
27444
+ });
27445
+ const sqlStatements = fromJson(filteredEnumsJsonStatements, "postgresql");
27357
27446
  const uniqueSqlStatements = [];
27358
27447
  sqlStatements.forEach((ss) => {
27359
27448
  if (!uniqueSqlStatements.includes(ss)) {
@@ -27369,7 +27458,7 @@ var init_snapshotsDiffer = __esm({
27369
27458
  });
27370
27459
  const _meta = prepareMigrationMeta(rSchemas, rTables, rColumns);
27371
27460
  return {
27372
- statements: filteredJsonStatements,
27461
+ statements: filteredEnumsJsonStatements,
27373
27462
  sqlStatements: uniqueSqlStatements,
27374
27463
  _meta
27375
27464
  };
@@ -56320,9 +56409,9 @@ var require_dist_cjs46 = __commonJS({
56320
56409
  }
56321
56410
  });
56322
56411
 
56323
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
56412
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
56324
56413
  var require_httpAuthSchemeProvider3 = __commonJS({
56325
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
56414
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
56326
56415
  "use strict";
56327
56416
  Object.defineProperty(exports2, "__esModule", { value: true });
56328
56417
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
@@ -56389,9 +56478,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
56389
56478
  }
56390
56479
  });
56391
56480
 
56392
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
56481
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
56393
56482
  var require_package4 = __commonJS({
56394
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
56483
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
56395
56484
  module2.exports = {
56396
56485
  name: "@aws-sdk/client-sso-oidc",
56397
56486
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -56495,9 +56584,9 @@ var require_package4 = __commonJS({
56495
56584
  }
56496
56585
  });
56497
56586
 
56498
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
56587
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
56499
56588
  var require_ruleset2 = __commonJS({
56500
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
56589
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
56501
56590
  "use strict";
56502
56591
  Object.defineProperty(exports2, "__esModule", { value: true });
56503
56592
  exports2.ruleSet = void 0;
@@ -56530,9 +56619,9 @@ var require_ruleset2 = __commonJS({
56530
56619
  }
56531
56620
  });
56532
56621
 
56533
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
56622
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
56534
56623
  var require_endpointResolver2 = __commonJS({
56535
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
56624
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
56536
56625
  "use strict";
56537
56626
  Object.defineProperty(exports2, "__esModule", { value: true });
56538
56627
  exports2.defaultEndpointResolver = void 0;
@@ -56550,9 +56639,9 @@ var require_endpointResolver2 = __commonJS({
56550
56639
  }
56551
56640
  });
56552
56641
 
56553
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
56642
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
56554
56643
  var require_runtimeConfig_shared2 = __commonJS({
56555
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
56644
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
56556
56645
  "use strict";
56557
56646
  Object.defineProperty(exports2, "__esModule", { value: true });
56558
56647
  exports2.getRuntimeConfig = void 0;
@@ -56596,9 +56685,9 @@ var require_runtimeConfig_shared2 = __commonJS({
56596
56685
  }
56597
56686
  });
56598
56687
 
56599
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
56688
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
56600
56689
  var require_runtimeConfig2 = __commonJS({
56601
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
56690
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
56602
56691
  "use strict";
56603
56692
  Object.defineProperty(exports2, "__esModule", { value: true });
56604
56693
  exports2.getRuntimeConfig = void 0;
@@ -56649,9 +56738,9 @@ var require_runtimeConfig2 = __commonJS({
56649
56738
  }
56650
56739
  });
56651
56740
 
56652
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
56741
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
56653
56742
  var require_dist_cjs47 = __commonJS({
56654
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
56743
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
56655
56744
  "use strict";
56656
56745
  var __defProp3 = Object.defineProperty;
56657
56746
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -57997,9 +58086,9 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
57997
58086
  }
57998
58087
  });
57999
58088
 
58000
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
58089
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
58001
58090
  var require_httpAuthSchemeProvider4 = __commonJS({
58002
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
58091
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
58003
58092
  "use strict";
58004
58093
  Object.defineProperty(exports2, "__esModule", { value: true });
58005
58094
  exports2.resolveHttpAuthSchemeConfig = exports2.resolveStsAuthConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0;
@@ -58069,9 +58158,9 @@ var require_httpAuthSchemeProvider4 = __commonJS({
58069
58158
  }
58070
58159
  });
58071
58160
 
58072
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js
58161
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js
58073
58162
  var require_EndpointParameters = __commonJS({
58074
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) {
58163
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) {
58075
58164
  "use strict";
58076
58165
  Object.defineProperty(exports2, "__esModule", { value: true });
58077
58166
  exports2.commonParams = exports2.resolveClientEndpointParameters = void 0;
@@ -58095,9 +58184,9 @@ var require_EndpointParameters = __commonJS({
58095
58184
  }
58096
58185
  });
58097
58186
 
58098
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json
58187
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
58099
58188
  var require_package5 = __commonJS({
58100
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) {
58189
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) {
58101
58190
  module2.exports = {
58102
58191
  name: "@aws-sdk/client-sts",
58103
58192
  description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
@@ -58203,9 +58292,9 @@ var require_package5 = __commonJS({
58203
58292
  }
58204
58293
  });
58205
58294
 
58206
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
58295
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
58207
58296
  var require_ruleset3 = __commonJS({
58208
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
58297
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
58209
58298
  "use strict";
58210
58299
  Object.defineProperty(exports2, "__esModule", { value: true });
58211
58300
  exports2.ruleSet = void 0;
@@ -58250,9 +58339,9 @@ var require_ruleset3 = __commonJS({
58250
58339
  }
58251
58340
  });
58252
58341
 
58253
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
58342
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
58254
58343
  var require_endpointResolver3 = __commonJS({
58255
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
58344
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
58256
58345
  "use strict";
58257
58346
  Object.defineProperty(exports2, "__esModule", { value: true });
58258
58347
  exports2.defaultEndpointResolver = void 0;
@@ -58270,9 +58359,9 @@ var require_endpointResolver3 = __commonJS({
58270
58359
  }
58271
58360
  });
58272
58361
 
58273
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
58362
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
58274
58363
  var require_runtimeConfig_shared3 = __commonJS({
58275
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
58364
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
58276
58365
  "use strict";
58277
58366
  Object.defineProperty(exports2, "__esModule", { value: true });
58278
58367
  exports2.getRuntimeConfig = void 0;
@@ -58316,9 +58405,9 @@ var require_runtimeConfig_shared3 = __commonJS({
58316
58405
  }
58317
58406
  });
58318
58407
 
58319
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
58408
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
58320
58409
  var require_runtimeConfig3 = __commonJS({
58321
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
58410
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
58322
58411
  "use strict";
58323
58412
  Object.defineProperty(exports2, "__esModule", { value: true });
58324
58413
  exports2.getRuntimeConfig = void 0;
@@ -58382,9 +58471,9 @@ var require_runtimeConfig3 = __commonJS({
58382
58471
  }
58383
58472
  });
58384
58473
 
58385
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js
58474
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js
58386
58475
  var require_httpAuthExtensionConfiguration = __commonJS({
58387
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) {
58476
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) {
58388
58477
  "use strict";
58389
58478
  Object.defineProperty(exports2, "__esModule", { value: true });
58390
58479
  exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0;
@@ -58430,9 +58519,9 @@ var require_httpAuthExtensionConfiguration = __commonJS({
58430
58519
  }
58431
58520
  });
58432
58521
 
58433
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js
58522
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js
58434
58523
  var require_runtimeExtensions = __commonJS({
58435
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) {
58524
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) {
58436
58525
  "use strict";
58437
58526
  Object.defineProperty(exports2, "__esModule", { value: true });
58438
58527
  exports2.resolveRuntimeExtensions = void 0;
@@ -58461,9 +58550,9 @@ var require_runtimeExtensions = __commonJS({
58461
58550
  }
58462
58551
  });
58463
58552
 
58464
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js
58553
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js
58465
58554
  var require_STSClient = __commonJS({
58466
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) {
58555
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) {
58467
58556
  "use strict";
58468
58557
  Object.defineProperty(exports2, "__esModule", { value: true });
58469
58558
  exports2.STSClient = exports2.__Client = void 0;
@@ -58525,9 +58614,9 @@ var require_STSClient = __commonJS({
58525
58614
  }
58526
58615
  });
58527
58616
 
58528
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
58617
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
58529
58618
  var require_dist_cjs50 = __commonJS({
58530
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
58619
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
58531
58620
  "use strict";
58532
58621
  var __defProp3 = Object.defineProperty;
58533
58622
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -85354,7 +85443,7 @@ init_utils2();
85354
85443
  var version2 = async () => {
85355
85444
  const { npmVersion } = await ormCoreVersions();
85356
85445
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
85357
- const envVersion = "0.25.0-bab5208";
85446
+ const envVersion = "0.25.0-cf24be9";
85358
85447
  const kitVersion = envVersion ? `v${envVersion}` : "--";
85359
85448
  const versions = `drizzle-kit: ${kitVersion}
85360
85449
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.25.0-bab5208",
3
+ "version": "0.25.0-cf24be9",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
@@ -80,7 +80,7 @@
80
80
  "commander": "^12.1.0",
81
81
  "dockerode": "^3.3.4",
82
82
  "dotenv": "^16.0.3",
83
- "drizzle-kit": "0.21.2",
83
+ "drizzle-kit": "0.25.0-b1faa33",
84
84
  "drizzle-orm": "workspace:./drizzle-orm/dist",
85
85
  "env-paths": "^3.0.0",
86
86
  "esbuild-node-externals": "^1.9.0",