drizzle-kit 0.9.42 → 0.9.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -24
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -164320,7 +164320,7 @@ var _prepareAddColumns = (tableName, columns) => {
164320
164320
  });
164321
164321
  };
164322
164322
  var _prepareAlterColumns = (tableName, columns) => {
164323
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
164323
+ var _a, _b, _c, _d, _e, _f, _g;
164324
164324
  let statements = [];
164325
164325
  for (const column of columns) {
164326
164326
  const columnName = typeof column.name !== "string" ? column.name.new : column.name;
@@ -164385,28 +164385,6 @@ var _prepareAlterColumns = (tableName, columns) => {
164385
164385
  columnName
164386
164386
  });
164387
164387
  }
164388
- if (((_h = column.notNull) == null ? void 0 : _h.type) === "added") {
164389
- statements.push({
164390
- type: "alter_table_alter_column_set_notnull",
164391
- tableName,
164392
- columnName
164393
- });
164394
- }
164395
- if (((_i = column.notNull) == null ? void 0 : _i.type) === "changed") {
164396
- const type2 = column.notNull.new ? "alter_table_alter_column_set_notnull" : "alter_table_alter_column_drop_notnull";
164397
- statements.push({
164398
- type: type2,
164399
- tableName,
164400
- columnName
164401
- });
164402
- }
164403
- if (((_j = column.notNull) == null ? void 0 : _j.type) === "deleted") {
164404
- statements.push({
164405
- type: "alter_table_alter_column_drop_notnull",
164406
- tableName,
164407
- columnName
164408
- });
164409
- }
164410
164388
  }
164411
164389
  return statements;
164412
164390
  };
@@ -164460,7 +164438,7 @@ var prepareAlterReferencesJson = (tableName, columns) => {
164460
164438
  };
164461
164439
  } else if (references.type === "changed") {
164462
164440
  const [oldFkey] = references.old.split(";");
164463
- const [fkName, toTable, toColumn, onDelete, onUpdate] = references.old.split(";");
164441
+ const [fkName, toTable, toColumn, onDelete, onUpdate] = references.new.split(";");
164464
164442
  const alterReference = {
164465
164443
  type: "alter_reference",
164466
164444
  fromTable: tableName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.9.42",
3
+ "version": "0.9.45",
4
4
  "author": "Alex Blokh <aleksandrblokh@gmail.com>",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "@types/js-yaml": "^4.0.3",
29
29
  "@types/pg": "^8.6.1",
30
30
  "@typescript-eslint/eslint-plugin": "4.4.1",
31
- "drizzle-orm": "^0.10.8",
31
+ "drizzle-orm": "^0.10.25",
32
32
  "esbuild-register": "^3.3.2",
33
33
  "eslint": "^7.2.0",
34
34
  "eslint-config-airbnb": "18.2.1",