drizzle-kit 0.25.0-bab5208 → 0.25.0-cf39bf5
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +96 -18
- package/api.mjs +96 -18
- package/bin.cjs +134 -55
- 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
|
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 =
|
12064
|
-
statement
|
12065
|
-
|
12066
|
-
|
12067
|
-
|
12068
|
-
|
12069
|
-
statement
|
12070
|
-
|
12071
|
-
|
12072
|
-
|
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} CASCADE;`;
|
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
|
12083
|
-
return `ALTER TYPE ${
|
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);
|
@@ -26658,7 +26736,7 @@ ${withStyle.errorWarning(
|
|
26658
26736
|
schema: tableSchema
|
26659
26737
|
} : void 0
|
26660
26738
|
};
|
26661
|
-
if (identityName) {
|
26739
|
+
if (identityName && typeof identityName === "string") {
|
26662
26740
|
delete sequencesToReturn[`${tableSchema}.${identityName.startsWith('"') && identityName.endsWith('"') ? identityName.slice(1, -1) : identityName}`];
|
26663
26741
|
delete sequencesToReturn[identityName];
|
26664
26742
|
}
|
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
|
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 =
|
12069
|
-
statement
|
12070
|
-
|
12071
|
-
|
12072
|
-
|
12073
|
-
|
12074
|
-
statement
|
12075
|
-
|
12076
|
-
|
12077
|
-
|
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} CASCADE;`;
|
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
|
12088
|
-
return `ALTER TYPE ${
|
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);
|
@@ -26663,7 +26741,7 @@ ${withStyle.errorWarning(
|
|
26663
26741
|
schema: tableSchema
|
26664
26742
|
} : void 0
|
26665
26743
|
};
|
26666
|
-
if (identityName) {
|
26744
|
+
if (identityName && typeof identityName === "string") {
|
26667
26745
|
delete sequencesToReturn[`${tableSchema}.${identityName.startsWith('"') && identityName.endsWith('"') ? identityName.slice(1, -1) : identityName}`];
|
26668
26746
|
delete sequencesToReturn[identityName];
|
26669
26747
|
}
|
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
|
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 =
|
23497
|
-
statement
|
23498
|
-
|
23499
|
-
|
23500
|
-
|
23501
|
-
|
23502
|
-
statement
|
23503
|
-
|
23504
|
-
|
23505
|
-
|
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} CASCADE;`;
|
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
|
23516
|
-
return `ALTER TYPE ${
|
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);
|
@@ -56320,9 +56399,9 @@ var require_dist_cjs46 = __commonJS({
|
|
56320
56399
|
}
|
56321
56400
|
});
|
56322
56401
|
|
56323
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
|
56402
|
+
// ../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
56403
|
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) {
|
56404
|
+
"../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
56405
|
"use strict";
|
56327
56406
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
56328
56407
|
exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
|
@@ -56389,9 +56468,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
|
|
56389
56468
|
}
|
56390
56469
|
});
|
56391
56470
|
|
56392
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
|
56471
|
+
// ../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
56472
|
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) {
|
56473
|
+
"../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
56474
|
module2.exports = {
|
56396
56475
|
name: "@aws-sdk/client-sso-oidc",
|
56397
56476
|
description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
@@ -56495,9 +56574,9 @@ var require_package4 = __commonJS({
|
|
56495
56574
|
}
|
56496
56575
|
});
|
56497
56576
|
|
56498
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
|
56577
|
+
// ../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
56578
|
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) {
|
56579
|
+
"../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
56580
|
"use strict";
|
56502
56581
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
56503
56582
|
exports2.ruleSet = void 0;
|
@@ -56530,9 +56609,9 @@ var require_ruleset2 = __commonJS({
|
|
56530
56609
|
}
|
56531
56610
|
});
|
56532
56611
|
|
56533
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
|
56612
|
+
// ../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
56613
|
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) {
|
56614
|
+
"../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
56615
|
"use strict";
|
56537
56616
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
56538
56617
|
exports2.defaultEndpointResolver = void 0;
|
@@ -56550,9 +56629,9 @@ var require_endpointResolver2 = __commonJS({
|
|
56550
56629
|
}
|
56551
56630
|
});
|
56552
56631
|
|
56553
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
|
56632
|
+
// ../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
56633
|
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) {
|
56634
|
+
"../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
56635
|
"use strict";
|
56557
56636
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
56558
56637
|
exports2.getRuntimeConfig = void 0;
|
@@ -56596,9 +56675,9 @@ var require_runtimeConfig_shared2 = __commonJS({
|
|
56596
56675
|
}
|
56597
56676
|
});
|
56598
56677
|
|
56599
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
|
56678
|
+
// ../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
56679
|
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) {
|
56680
|
+
"../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
56681
|
"use strict";
|
56603
56682
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
56604
56683
|
exports2.getRuntimeConfig = void 0;
|
@@ -56649,9 +56728,9 @@ var require_runtimeConfig2 = __commonJS({
|
|
56649
56728
|
}
|
56650
56729
|
});
|
56651
56730
|
|
56652
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
|
56731
|
+
// ../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
56732
|
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) {
|
56733
|
+
"../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
56734
|
"use strict";
|
56656
56735
|
var __defProp3 = Object.defineProperty;
|
56657
56736
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
@@ -57997,9 +58076,9 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
57997
58076
|
}
|
57998
58077
|
});
|
57999
58078
|
|
58000
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58079
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
|
58001
58080
|
var require_httpAuthSchemeProvider4 = __commonJS({
|
58002
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58081
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
|
58003
58082
|
"use strict";
|
58004
58083
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58005
58084
|
exports2.resolveHttpAuthSchemeConfig = exports2.resolveStsAuthConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0;
|
@@ -58069,9 +58148,9 @@ var require_httpAuthSchemeProvider4 = __commonJS({
|
|
58069
58148
|
}
|
58070
58149
|
});
|
58071
58150
|
|
58072
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58151
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js
|
58073
58152
|
var require_EndpointParameters = __commonJS({
|
58074
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58153
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) {
|
58075
58154
|
"use strict";
|
58076
58155
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58077
58156
|
exports2.commonParams = exports2.resolveClientEndpointParameters = void 0;
|
@@ -58095,9 +58174,9 @@ var require_EndpointParameters = __commonJS({
|
|
58095
58174
|
}
|
58096
58175
|
});
|
58097
58176
|
|
58098
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58177
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
|
58099
58178
|
var require_package5 = __commonJS({
|
58100
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58179
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) {
|
58101
58180
|
module2.exports = {
|
58102
58181
|
name: "@aws-sdk/client-sts",
|
58103
58182
|
description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
@@ -58203,9 +58282,9 @@ var require_package5 = __commonJS({
|
|
58203
58282
|
}
|
58204
58283
|
});
|
58205
58284
|
|
58206
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58285
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
|
58207
58286
|
var require_ruleset3 = __commonJS({
|
58208
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58287
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
|
58209
58288
|
"use strict";
|
58210
58289
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58211
58290
|
exports2.ruleSet = void 0;
|
@@ -58250,9 +58329,9 @@ var require_ruleset3 = __commonJS({
|
|
58250
58329
|
}
|
58251
58330
|
});
|
58252
58331
|
|
58253
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58332
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
|
58254
58333
|
var require_endpointResolver3 = __commonJS({
|
58255
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58334
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
|
58256
58335
|
"use strict";
|
58257
58336
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58258
58337
|
exports2.defaultEndpointResolver = void 0;
|
@@ -58270,9 +58349,9 @@ var require_endpointResolver3 = __commonJS({
|
|
58270
58349
|
}
|
58271
58350
|
});
|
58272
58351
|
|
58273
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58352
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
|
58274
58353
|
var require_runtimeConfig_shared3 = __commonJS({
|
58275
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58354
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
|
58276
58355
|
"use strict";
|
58277
58356
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58278
58357
|
exports2.getRuntimeConfig = void 0;
|
@@ -58316,9 +58395,9 @@ var require_runtimeConfig_shared3 = __commonJS({
|
|
58316
58395
|
}
|
58317
58396
|
});
|
58318
58397
|
|
58319
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58398
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
|
58320
58399
|
var require_runtimeConfig3 = __commonJS({
|
58321
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58400
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
|
58322
58401
|
"use strict";
|
58323
58402
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58324
58403
|
exports2.getRuntimeConfig = void 0;
|
@@ -58382,9 +58461,9 @@ var require_runtimeConfig3 = __commonJS({
|
|
58382
58461
|
}
|
58383
58462
|
});
|
58384
58463
|
|
58385
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58464
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js
|
58386
58465
|
var require_httpAuthExtensionConfiguration = __commonJS({
|
58387
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58466
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) {
|
58388
58467
|
"use strict";
|
58389
58468
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58390
58469
|
exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0;
|
@@ -58430,9 +58509,9 @@ var require_httpAuthExtensionConfiguration = __commonJS({
|
|
58430
58509
|
}
|
58431
58510
|
});
|
58432
58511
|
|
58433
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58512
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js
|
58434
58513
|
var require_runtimeExtensions = __commonJS({
|
58435
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58514
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) {
|
58436
58515
|
"use strict";
|
58437
58516
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58438
58517
|
exports2.resolveRuntimeExtensions = void 0;
|
@@ -58461,9 +58540,9 @@ var require_runtimeExtensions = __commonJS({
|
|
58461
58540
|
}
|
58462
58541
|
});
|
58463
58542
|
|
58464
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58543
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js
|
58465
58544
|
var require_STSClient = __commonJS({
|
58466
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58545
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) {
|
58467
58546
|
"use strict";
|
58468
58547
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
58469
58548
|
exports2.STSClient = exports2.__Client = void 0;
|
@@ -58525,9 +58604,9 @@ var require_STSClient = __commonJS({
|
|
58525
58604
|
}
|
58526
58605
|
});
|
58527
58606
|
|
58528
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58607
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
|
58529
58608
|
var require_dist_cjs50 = __commonJS({
|
58530
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.
|
58609
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
|
58531
58610
|
"use strict";
|
58532
58611
|
var __defProp3 = Object.defineProperty;
|
58533
58612
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
@@ -85354,7 +85433,7 @@ init_utils2();
|
|
85354
85433
|
var version2 = async () => {
|
85355
85434
|
const { npmVersion } = await ormCoreVersions();
|
85356
85435
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
85357
|
-
const envVersion = "0.25.0-
|
85436
|
+
const envVersion = "0.25.0-cf39bf5";
|
85358
85437
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
85359
85438
|
const versions = `drizzle-kit: ${kitVersion}
|
85360
85439
|
${ormVersion}`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.25.0-
|
3
|
+
"version": "0.25.0-cf39bf5",
|
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.
|
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",
|