drizzle-kit 0.22.3 → 0.22.4
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +2 -60
- package/package.json +2 -2
- package/payload.js +0 -58
- package/payload.mjs +0 -58
package/bin.cjs
CHANGED
@@ -120410,64 +120410,6 @@ var init_pgPushUtils = __esm({
|
|
120410
120410
|
tablesToTruncate.push(statement.tableName);
|
120411
120411
|
shouldAskForApprove = true;
|
120412
120412
|
}
|
120413
|
-
} else if (statement.type === "alter_table_alter_column_drop_default") {
|
120414
|
-
if (statement.columnNotNull) {
|
120415
|
-
const res = await db2.query(
|
120416
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
120417
|
-
statement.schema,
|
120418
|
-
statement.tableName,
|
120419
|
-
renamedSchemas,
|
120420
|
-
renamedTables
|
120421
|
-
)}`
|
120422
|
-
);
|
120423
|
-
const count = Number(res[0].count);
|
120424
|
-
if (count > 0) {
|
120425
|
-
infoToPrint.push(
|
120426
|
-
`\xB7 You're about to remove default value from ${source_default.underline(
|
120427
|
-
statement.columnName
|
120428
|
-
)} not-null column with ${count} items`
|
120429
|
-
);
|
120430
|
-
tablesToTruncate.push(statement.tableName);
|
120431
|
-
statementsToExecute.push(
|
120432
|
-
`truncate table ${tableNameWithSchemaFrom(
|
120433
|
-
statement.schema,
|
120434
|
-
statement.tableName,
|
120435
|
-
renamedSchemas,
|
120436
|
-
renamedTables
|
120437
|
-
)} cascade;`
|
120438
|
-
);
|
120439
|
-
shouldAskForApprove = true;
|
120440
|
-
}
|
120441
|
-
}
|
120442
|
-
} else if (statement.type === "alter_table_alter_column_set_notnull") {
|
120443
|
-
if (typeof statement.columnDefault === "undefined") {
|
120444
|
-
const res = await db2.query(
|
120445
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
120446
|
-
statement.schema,
|
120447
|
-
statement.tableName,
|
120448
|
-
renamedSchemas,
|
120449
|
-
renamedTables
|
120450
|
-
)}`
|
120451
|
-
);
|
120452
|
-
const count = Number(res[0].count);
|
120453
|
-
if (count > 0) {
|
120454
|
-
infoToPrint.push(
|
120455
|
-
`\xB7 You're about to set not-null constraint to ${source_default.underline(
|
120456
|
-
statement.columnName
|
120457
|
-
)} column without default, which contains ${count} items`
|
120458
|
-
);
|
120459
|
-
tablesToTruncate.push(statement.tableName);
|
120460
|
-
statementsToExecute.push(
|
120461
|
-
`truncate table ${tableNameWithSchemaFrom(
|
120462
|
-
statement.schema,
|
120463
|
-
statement.tableName,
|
120464
|
-
renamedSchemas,
|
120465
|
-
renamedTables
|
120466
|
-
)} cascade;`
|
120467
|
-
);
|
120468
|
-
shouldAskForApprove = true;
|
120469
|
-
}
|
120470
|
-
}
|
120471
120413
|
} else if (statement.type === "alter_table_alter_column_drop_pk") {
|
120472
120414
|
const res = await db2.query(
|
120473
120415
|
`select count(*) as count from ${tableNameWithSchemaFrom(
|
@@ -122589,7 +122531,7 @@ var init_push = __esm({
|
|
122589
122531
|
}
|
122590
122532
|
}
|
122591
122533
|
} catch (e2) {
|
122592
|
-
console.
|
122534
|
+
console.error(e2);
|
122593
122535
|
}
|
122594
122536
|
};
|
122595
122537
|
sqlitePush = async (schemaPath, verbose, strict, credentials2, tablesFilter) => {
|
@@ -129560,7 +129502,7 @@ var printVersions = async () => {
|
|
129560
129502
|
var versions = async () => {
|
129561
129503
|
const { npmVersion } = await ormCoreVersions();
|
129562
129504
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
129563
|
-
const envVersion = "0.22.
|
129505
|
+
const envVersion = "0.22.4";
|
129564
129506
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
129565
129507
|
const versions2 = `drizzle-kit: ${kitVersion}
|
129566
129508
|
${ormVersion}`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.22.
|
3
|
+
"version": "0.22.4",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@arethetypeswrong/cli": "^0.15.3",
|
28
28
|
"@aws-sdk/client-rds-data": "^3.556.0",
|
29
29
|
"@cloudflare/workers-types": "^4.20230518.0",
|
30
|
-
"@electric-sql/pglite": "^0.1.
|
30
|
+
"@electric-sql/pglite": "^0.1.5",
|
31
31
|
"@hono/node-server": "^1.9.0",
|
32
32
|
"@hono/zod-validator": "^0.2.1",
|
33
33
|
"@libsql/client": "^0.4.2",
|
package/payload.js
CHANGED
@@ -33468,64 +33468,6 @@ var pgSuggestions = async (db, statements) => {
|
|
33468
33468
|
tablesToTruncate.push(statement.tableName);
|
33469
33469
|
shouldAskForApprove = true;
|
33470
33470
|
}
|
33471
|
-
} else if (statement.type === "alter_table_alter_column_drop_default") {
|
33472
|
-
if (statement.columnNotNull) {
|
33473
|
-
const res = await db.query(
|
33474
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
33475
|
-
statement.schema,
|
33476
|
-
statement.tableName,
|
33477
|
-
renamedSchemas,
|
33478
|
-
renamedTables
|
33479
|
-
)}`
|
33480
|
-
);
|
33481
|
-
const count2 = Number(res[0].count);
|
33482
|
-
if (count2 > 0) {
|
33483
|
-
infoToPrint.push(
|
33484
|
-
`\xB7 You're about to remove default value from ${source_default.underline(
|
33485
|
-
statement.columnName
|
33486
|
-
)} not-null column with ${count2} items`
|
33487
|
-
);
|
33488
|
-
tablesToTruncate.push(statement.tableName);
|
33489
|
-
statementsToExecute.push(
|
33490
|
-
`truncate table ${tableNameWithSchemaFrom(
|
33491
|
-
statement.schema,
|
33492
|
-
statement.tableName,
|
33493
|
-
renamedSchemas,
|
33494
|
-
renamedTables
|
33495
|
-
)} cascade;`
|
33496
|
-
);
|
33497
|
-
shouldAskForApprove = true;
|
33498
|
-
}
|
33499
|
-
}
|
33500
|
-
} else if (statement.type === "alter_table_alter_column_set_notnull") {
|
33501
|
-
if (typeof statement.columnDefault === "undefined") {
|
33502
|
-
const res = await db.query(
|
33503
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
33504
|
-
statement.schema,
|
33505
|
-
statement.tableName,
|
33506
|
-
renamedSchemas,
|
33507
|
-
renamedTables
|
33508
|
-
)}`
|
33509
|
-
);
|
33510
|
-
const count2 = Number(res[0].count);
|
33511
|
-
if (count2 > 0) {
|
33512
|
-
infoToPrint.push(
|
33513
|
-
`\xB7 You're about to set not-null constraint to ${source_default.underline(
|
33514
|
-
statement.columnName
|
33515
|
-
)} column without default, which contains ${count2} items`
|
33516
|
-
);
|
33517
|
-
tablesToTruncate.push(statement.tableName);
|
33518
|
-
statementsToExecute.push(
|
33519
|
-
`truncate table ${tableNameWithSchemaFrom(
|
33520
|
-
statement.schema,
|
33521
|
-
statement.tableName,
|
33522
|
-
renamedSchemas,
|
33523
|
-
renamedTables
|
33524
|
-
)} cascade;`
|
33525
|
-
);
|
33526
|
-
shouldAskForApprove = true;
|
33527
|
-
}
|
33528
|
-
}
|
33529
33471
|
} else if (statement.type === "alter_table_alter_column_drop_pk") {
|
33530
33472
|
const res = await db.query(
|
33531
33473
|
`select count(*) as count from ${tableNameWithSchemaFrom(
|
package/payload.mjs
CHANGED
@@ -33460,64 +33460,6 @@ var pgSuggestions = async (db, statements) => {
|
|
33460
33460
|
tablesToTruncate.push(statement.tableName);
|
33461
33461
|
shouldAskForApprove = true;
|
33462
33462
|
}
|
33463
|
-
} else if (statement.type === "alter_table_alter_column_drop_default") {
|
33464
|
-
if (statement.columnNotNull) {
|
33465
|
-
const res = await db.query(
|
33466
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
33467
|
-
statement.schema,
|
33468
|
-
statement.tableName,
|
33469
|
-
renamedSchemas,
|
33470
|
-
renamedTables
|
33471
|
-
)}`
|
33472
|
-
);
|
33473
|
-
const count2 = Number(res[0].count);
|
33474
|
-
if (count2 > 0) {
|
33475
|
-
infoToPrint.push(
|
33476
|
-
`\xB7 You're about to remove default value from ${source_default.underline(
|
33477
|
-
statement.columnName
|
33478
|
-
)} not-null column with ${count2} items`
|
33479
|
-
);
|
33480
|
-
tablesToTruncate.push(statement.tableName);
|
33481
|
-
statementsToExecute.push(
|
33482
|
-
`truncate table ${tableNameWithSchemaFrom(
|
33483
|
-
statement.schema,
|
33484
|
-
statement.tableName,
|
33485
|
-
renamedSchemas,
|
33486
|
-
renamedTables
|
33487
|
-
)} cascade;`
|
33488
|
-
);
|
33489
|
-
shouldAskForApprove = true;
|
33490
|
-
}
|
33491
|
-
}
|
33492
|
-
} else if (statement.type === "alter_table_alter_column_set_notnull") {
|
33493
|
-
if (typeof statement.columnDefault === "undefined") {
|
33494
|
-
const res = await db.query(
|
33495
|
-
`select count(*) as count from ${tableNameWithSchemaFrom(
|
33496
|
-
statement.schema,
|
33497
|
-
statement.tableName,
|
33498
|
-
renamedSchemas,
|
33499
|
-
renamedTables
|
33500
|
-
)}`
|
33501
|
-
);
|
33502
|
-
const count2 = Number(res[0].count);
|
33503
|
-
if (count2 > 0) {
|
33504
|
-
infoToPrint.push(
|
33505
|
-
`\xB7 You're about to set not-null constraint to ${source_default.underline(
|
33506
|
-
statement.columnName
|
33507
|
-
)} column without default, which contains ${count2} items`
|
33508
|
-
);
|
33509
|
-
tablesToTruncate.push(statement.tableName);
|
33510
|
-
statementsToExecute.push(
|
33511
|
-
`truncate table ${tableNameWithSchemaFrom(
|
33512
|
-
statement.schema,
|
33513
|
-
statement.tableName,
|
33514
|
-
renamedSchemas,
|
33515
|
-
renamedTables
|
33516
|
-
)} cascade;`
|
33517
|
-
);
|
33518
|
-
shouldAskForApprove = true;
|
33519
|
-
}
|
33520
|
-
}
|
33521
33463
|
} else if (statement.type === "alter_table_alter_column_drop_pk") {
|
33522
33464
|
const res = await db.query(
|
33523
33465
|
`select count(*) as count from ${tableNameWithSchemaFrom(
|