drizzle-kit 0.22.1 → 0.22.3

Sign up to get free protection for your applications and to get access to all the features.
package/bin.cjs CHANGED
@@ -9020,7 +9020,7 @@ var init_pgSchema = __esm({
9020
9020
  squashIdx: (idx) => {
9021
9021
  index2.parse(idx);
9022
9022
  return `${idx.name};${idx.columns.map(
9023
- (c) => `${c.expression},${c.isExpression},${c.asc},${c.nulls},${c.opclass}`
9023
+ (c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
9024
9024
  ).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
9025
9025
  },
9026
9026
  unsquashIdx: (input) => {
@@ -9036,7 +9036,7 @@ var init_pgSchema = __esm({
9036
9036
  const columnString = columnsString.split(",,");
9037
9037
  const columns = [];
9038
9038
  for (const column7 of columnString) {
9039
- const [expression, isExpression, asc, nulls, opclass] = column7.split(",");
9039
+ const [expression, isExpression, asc, nulls, opclass] = column7.split("--");
9040
9040
  columns.push({
9041
9041
  nulls,
9042
9042
  isExpression: isExpression === "true",
@@ -26523,7 +26523,7 @@ var init_jsonDiffer = __esm({
26523
26523
  return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
26524
26524
  })
26525
26525
  );
26526
- const mappedAltered = altered.map((it) => alternationsInColumn(it));
26526
+ const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
26527
26527
  return {
26528
26528
  name: table4.name,
26529
26529
  schema: table4.schema || "",
@@ -26544,7 +26544,12 @@ var init_jsonDiffer = __esm({
26544
26544
  };
26545
26545
  alternationsInColumn = (column7) => {
26546
26546
  const altered = [column7];
26547
- const result = altered.map((it) => {
26547
+ const result = altered.filter((it) => {
26548
+ if ("type" in it && it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
26549
+ return false;
26550
+ }
26551
+ return true;
26552
+ }).map((it) => {
26548
26553
  if (typeof it.name !== "string" && "__old" in it.name) {
26549
26554
  return {
26550
26555
  ...it,
@@ -26554,9 +26559,6 @@ var init_jsonDiffer = __esm({
26554
26559
  return it;
26555
26560
  }).map((it) => {
26556
26561
  if ("type" in it) {
26557
- if (it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
26558
- return void 0;
26559
- }
26560
26562
  return {
26561
26563
  ...it,
26562
26564
  type: { type: "changed", old: it.type.__old, new: it.type.__new }
@@ -129558,7 +129560,7 @@ var printVersions = async () => {
129558
129560
  var versions = async () => {
129559
129561
  const { npmVersion } = await ormCoreVersions();
129560
129562
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
129561
- const envVersion = "0.22.1";
129563
+ const envVersion = "0.22.3";
129562
129564
  const kitVersion = envVersion ? `v${envVersion}` : "--";
129563
129565
  const versions2 = `drizzle-kit: ${kitVersion}
129564
129566
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.22.1",
3
+ "version": "0.22.3",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
package/payload.js CHANGED
@@ -15153,7 +15153,7 @@ var init_pgSchema = __esm({
15153
15153
  squashIdx: (idx) => {
15154
15154
  index2.parse(idx);
15155
15155
  return `${idx.name};${idx.columns.map(
15156
- (c) => `${c.expression},${c.isExpression},${c.asc},${c.nulls},${c.opclass}`
15156
+ (c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
15157
15157
  ).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
15158
15158
  },
15159
15159
  unsquashIdx: (input) => {
@@ -15169,7 +15169,7 @@ var init_pgSchema = __esm({
15169
15169
  const columnString = columnsString.split(",,");
15170
15170
  const columns = [];
15171
15171
  for (const column4 of columnString) {
15172
- const [expression, isExpression, asc2, nulls, opclass] = column4.split(",");
15172
+ const [expression, isExpression, asc2, nulls, opclass] = column4.split("--");
15173
15173
  columns.push({
15174
15174
  nulls,
15175
15175
  isExpression: isExpression === "true",
@@ -20657,7 +20657,7 @@ var init_jsonDiffer = __esm({
20657
20657
  return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
20658
20658
  })
20659
20659
  );
20660
- const mappedAltered = altered.map((it) => alternationsInColumn(it));
20660
+ const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
20661
20661
  return {
20662
20662
  name: table4.name,
20663
20663
  schema: table4.schema || "",
@@ -20678,7 +20678,12 @@ var init_jsonDiffer = __esm({
20678
20678
  };
20679
20679
  alternationsInColumn = (column4) => {
20680
20680
  const altered = [column4];
20681
- const result = altered.map((it) => {
20681
+ const result = altered.filter((it) => {
20682
+ if ("type" in it && it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
20683
+ return false;
20684
+ }
20685
+ return true;
20686
+ }).map((it) => {
20682
20687
  if (typeof it.name !== "string" && "__old" in it.name) {
20683
20688
  return {
20684
20689
  ...it,
@@ -20688,9 +20693,6 @@ var init_jsonDiffer = __esm({
20688
20693
  return it;
20689
20694
  }).map((it) => {
20690
20695
  if ("type" in it) {
20691
- if (it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
20692
- return void 0;
20693
- }
20694
20696
  return {
20695
20697
  ...it,
20696
20698
  type: { type: "changed", old: it.type.__old, new: it.type.__new }
package/payload.mjs CHANGED
@@ -15159,7 +15159,7 @@ var init_pgSchema = __esm({
15159
15159
  squashIdx: (idx) => {
15160
15160
  index2.parse(idx);
15161
15161
  return `${idx.name};${idx.columns.map(
15162
- (c) => `${c.expression},${c.isExpression},${c.asc},${c.nulls},${c.opclass}`
15162
+ (c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
15163
15163
  ).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
15164
15164
  },
15165
15165
  unsquashIdx: (input) => {
@@ -15175,7 +15175,7 @@ var init_pgSchema = __esm({
15175
15175
  const columnString = columnsString.split(",,");
15176
15176
  const columns = [];
15177
15177
  for (const column4 of columnString) {
15178
- const [expression, isExpression, asc2, nulls, opclass] = column4.split(",");
15178
+ const [expression, isExpression, asc2, nulls, opclass] = column4.split("--");
15179
15179
  columns.push({
15180
15180
  nulls,
15181
15181
  isExpression: isExpression === "true",
@@ -20663,7 +20663,7 @@ var init_jsonDiffer = __esm({
20663
20663
  return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
20664
20664
  })
20665
20665
  );
20666
- const mappedAltered = altered.map((it) => alternationsInColumn(it));
20666
+ const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
20667
20667
  return {
20668
20668
  name: table4.name,
20669
20669
  schema: table4.schema || "",
@@ -20684,7 +20684,12 @@ var init_jsonDiffer = __esm({
20684
20684
  };
20685
20685
  alternationsInColumn = (column4) => {
20686
20686
  const altered = [column4];
20687
- const result = altered.map((it) => {
20687
+ const result = altered.filter((it) => {
20688
+ if ("type" in it && it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
20689
+ return false;
20690
+ }
20691
+ return true;
20692
+ }).map((it) => {
20688
20693
  if (typeof it.name !== "string" && "__old" in it.name) {
20689
20694
  return {
20690
20695
  ...it,
@@ -20694,9 +20699,6 @@ var init_jsonDiffer = __esm({
20694
20699
  return it;
20695
20700
  }).map((it) => {
20696
20701
  if ("type" in it) {
20697
- if (it.type.__old.replace(" (", "(") === it.type.__new.replace(" (", "(")) {
20698
- return void 0;
20699
- }
20700
20702
  return {
20701
20703
  ...it,
20702
20704
  type: { type: "changed", old: it.type.__old, new: it.type.__new }