drizzle-kit 0.20.17-2132ef8 → 0.20.17-388fa1b

Sign up to get free protection for your applications and to get access to all the features.
package/payload.js CHANGED
@@ -4695,7 +4695,7 @@ var init_pgSchema = __esm({
4695
4695
  }).strict();
4696
4696
  pgSchemaInternal = objectType({
4697
4697
  version: literalType("6"),
4698
- dialect: literalType("postgresql"),
4698
+ dialect: literalType("pg"),
4699
4699
  tables: recordType(stringType(), table2),
4700
4700
  enums: recordType(stringType(), enumSchema),
4701
4701
  schemas: recordType(stringType(), stringType()),
@@ -4724,14 +4724,14 @@ var init_pgSchema = __esm({
4724
4724
  }).strict();
4725
4725
  pgSchemaSquashedV4 = objectType({
4726
4726
  version: literalType("4"),
4727
- dialect: literalType("pg"),
4727
+ dialect: enumType(["pg"]),
4728
4728
  tables: recordType(stringType(), tableSquashedV42),
4729
4729
  enums: recordType(stringType(), enumSchemaV1),
4730
4730
  schemas: recordType(stringType(), stringType())
4731
4731
  }).strict();
4732
4732
  pgSchemaSquashed = objectType({
4733
4733
  version: literalType("6"),
4734
- dialect: literalType("postgresql"),
4734
+ dialect: enumType(["pg"]),
4735
4735
  tables: recordType(stringType(), tableSquashed2),
4736
4736
  enums: recordType(stringType(), enumSchema),
4737
4737
  schemas: recordType(stringType(), stringType())
@@ -4842,7 +4842,7 @@ var init_pgSchema = __esm({
4842
4842
  };
4843
4843
  dryPg = pgSchema.parse({
4844
4844
  version: snapshotVersion,
4845
- dialect: "postgresql",
4845
+ dialect: "pg",
4846
4846
  id: originUUID,
4847
4847
  prevId: "",
4848
4848
  tables: {},
@@ -5305,8 +5305,7 @@ var init_outputs = __esm({
5305
5305
  warning: (str) => `${source_default.white.bgGray(" Warning ")} ${str}`,
5306
5306
  errorWarning: (str) => `${source_default.red(`${source_default.white.bgRed(" Warning ")} ${str}`)}`,
5307
5307
  fullWarning: (str) => `${source_default.black.bgYellow("[Warning]")} ${source_default.bold(str)}`,
5308
- suggestion: (str) => `${source_default.white.bgGray(" Suggestion ")} ${str}`,
5309
- info: (str) => `${source_default.grey(str)}`
5308
+ suggestion: (str) => `${source_default.white.bgGray(" Suggestion ")} ${str}`
5310
5309
  };
5311
5310
  }
5312
5311
  });
@@ -5328,6 +5327,7 @@ var init_mysql = __esm({
5328
5327
  }),
5329
5328
  objectType({
5330
5329
  url: stringType()
5330
+ // TODO: change docs
5331
5331
  })
5332
5332
  ]);
5333
5333
  }
@@ -5391,7 +5391,7 @@ var init_schemaValidator = __esm({
5391
5391
  init_mysqlSchema();
5392
5392
  init_pgSchema();
5393
5393
  init_sqliteSchema();
5394
- dialect3 = enumType(["postgresql", "mysql", "sqlite"]);
5394
+ dialect3 = enumType(["pg", "mysql", "sqlite"]);
5395
5395
  commonSquashedSchema = unionType([
5396
5396
  pgSchemaSquashed,
5397
5397
  mysqlSchemaSquashed,
@@ -5511,8 +5511,8 @@ var init_cli = __esm({
5511
5511
  dialect: dialect3,
5512
5512
  schema: unionType([stringType(), stringType().array()]).optional(),
5513
5513
  tablesFilter: unionType([stringType(), stringType().array()]).optional(),
5514
- schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
5515
- driver: stringType().optional(),
5514
+ schemaFilters: unionType([stringType(), stringType().array()]).optional().default(["public"]),
5515
+ driver: stringType(),
5516
5516
  // pg
5517
5517
  connectionString: stringType().optional(),
5518
5518
  // mysql
@@ -5548,7 +5548,7 @@ var init_cli = __esm({
5548
5548
  ssl: stringType().optional(),
5549
5549
  url: stringType().optional(),
5550
5550
  authToken: stringType().optional(),
5551
- introspectCasing: casing,
5551
+ "introspect-casing": casing,
5552
5552
  breakpoints: booleanType().optional().default(true)
5553
5553
  });
5554
5554
  configCheck = objectType({
@@ -11502,7 +11502,7 @@ ${withStyle.errorWarning(
11502
11502
  );
11503
11503
  return {
11504
11504
  version: "6",
11505
- dialect: "postgresql",
11505
+ dialect: "pg",
11506
11506
  tables: result,
11507
11507
  enums: enumsToReturn,
11508
11508
  schemas: schemasObject,
@@ -11709,7 +11709,7 @@ ${withStyle.errorWarning(
11709
11709
  const columnName = columnResponse.attname;
11710
11710
  const columnAdditionalDT = columnResponse.additional_dt;
11711
11711
  const columnDimensions = columnResponse.array_dimensions;
11712
- const enumType3 = columnResponse.enum_name;
11712
+ const enumType2 = columnResponse.enum_name;
11713
11713
  let columnType = columnResponse.data_type;
11714
11714
  const primaryKey = tableConstraints.filter(
11715
11715
  (mapRow) => columnName === mapRow.column_name && mapRow.constraint_type === "PRIMARY KEY"
@@ -11773,8 +11773,8 @@ ${withStyle.errorWarning(
11773
11773
  columnTypeMapped = trimChar(columnTypeMapped, '"');
11774
11774
  columnToReturn[columnName] = {
11775
11775
  name: columnName,
11776
- type: columnAdditionalDT === "USER-DEFINED" ? enumType3 : columnTypeMapped,
11777
- typeSchema: enumsToReturn[`${tableSchema}.${enumType3}`] !== void 0 ? enumsToReturn[`${tableSchema}.${enumType3}`].schema : void 0,
11776
+ type: columnAdditionalDT === "USER-DEFINED" ? enumType2 : columnTypeMapped,
11777
+ typeSchema: enumsToReturn[`${tableSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${tableSchema}.${enumType2}`].schema : void 0,
11778
11778
  primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
11779
11779
  // default: isSerial ? undefined : defaultValue,
11780
11780
  notNull: columnResponse.is_nullable === "NO"
@@ -11857,7 +11857,7 @@ ${withStyle.errorWarning(
11857
11857
  const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
11858
11858
  return {
11859
11859
  version: "6",
11860
- dialect: "postgresql",
11860
+ dialect: "pg",
11861
11861
  tables: result,
11862
11862
  enums: enumsToReturn,
11863
11863
  schemas: schemasObject,
@@ -15088,7 +15088,7 @@ var init_snapshotsDiffer = __esm({
15088
15088
  const jsonTableAlternations = alteredTables.map((it) => {
15089
15089
  return preparePgAlterColumns(it.name, it.schema, it.altered, json2);
15090
15090
  }).flat();
15091
- const jsonCreateIndexesFoAlteredTables = alteredTables.map((it) => {
15091
+ const jsonCreateIndexesForAllAlteredTables = alteredTables.map((it) => {
15092
15092
  return prepareCreateIndexesJson(
15093
15093
  it.name,
15094
15094
  it.schema,
@@ -15117,21 +15117,14 @@ var init_snapshotsDiffer = __esm({
15117
15117
  },
15118
15118
  {}
15119
15119
  );
15120
- jsonCreateIndexesFoAlteredTables.push(
15120
+ jsonCreateIndexesForAllAlteredTables.push(
15121
15121
  ...prepareCreateIndexesJson(it.name, it.schema, createdIndexes || {})
15122
15122
  );
15123
15123
  jsonDropIndexesForAllAlteredTables.push(
15124
15124
  ...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
15125
15125
  );
15126
15126
  });
15127
- const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
15128
- return prepareCreateReferencesJson(
15129
- it.name,
15130
- it.schema,
15131
- it.foreignKeys
15132
- );
15133
- }).flat();
15134
- const jsonReferencesForAlteredTables = alteredTables.map((it) => {
15127
+ const jsonReferencesForAllAlteredTables = alteredTables.map((it) => {
15135
15128
  const forAdded = prepareCreateReferencesJson(
15136
15129
  it.name,
15137
15130
  it.schema,
@@ -15149,10 +15142,10 @@ var init_snapshotsDiffer = __esm({
15149
15142
  );
15150
15143
  return [...forAdded, ...forAltered, ...alteredFKs];
15151
15144
  }).flat();
15152
- const jsonCreatedReferencesForAlteredTables = jsonReferencesForAlteredTables.filter(
15145
+ const jsonCreatedReferencesForAlteredTables = jsonReferencesForAllAlteredTables.filter(
15153
15146
  (t) => t.type === "create_reference"
15154
15147
  );
15155
- const jsonDroppedReferencesForAlteredTables = jsonReferencesForAlteredTables.filter(
15148
+ const jsonDroppedReferencesForAlteredTables = jsonReferencesForAllAlteredTables.filter(
15156
15149
  (t) => t.type === "delete_reference"
15157
15150
  );
15158
15151
  const createEnums = createdEnums.map((it) => {
@@ -15179,7 +15172,7 @@ var init_snapshotsDiffer = __esm({
15179
15172
  const dropSchemas = prepareDeleteSchemasJson(
15180
15173
  deletedSchemas.map((it) => it.name)
15181
15174
  );
15182
- const createTables = createdTables.map((it) => {
15175
+ const jsonPgCreateTables = createdTables.map((it) => {
15183
15176
  return preparePgCreateTableJson(it, curFull);
15184
15177
  });
15185
15178
  jsonStatements.push(...createSchemas);
@@ -15188,7 +15181,7 @@ var init_snapshotsDiffer = __esm({
15188
15181
  jsonStatements.push(...moveEnums);
15189
15182
  jsonStatements.push(...renameEnums);
15190
15183
  jsonStatements.push(...jsonAlterEnumsWithAddedValues);
15191
- jsonStatements.push(...createTables);
15184
+ jsonStatements.push(...jsonPgCreateTables);
15192
15185
  jsonStatements.push(...jsonDropTables);
15193
15186
  jsonStatements.push(...jsonSetTableSchemas);
15194
15187
  jsonStatements.push(...jsonRenameTables);
@@ -15199,16 +15192,15 @@ var init_snapshotsDiffer = __esm({
15199
15192
  jsonStatements.push(...jsonTableAlternations);
15200
15193
  jsonStatements.push(...jsonAddedCompositePKs);
15201
15194
  jsonStatements.push(...jsonAddColumnsStatemets);
15202
- jsonStatements.push(...jsonCreateReferencesForCreatedTables);
15203
15195
  jsonStatements.push(...jsonCreateIndexesForCreatedTables);
15196
+ jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
15204
15197
  jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
15205
- jsonStatements.push(...jsonCreateIndexesFoAlteredTables);
15206
15198
  jsonStatements.push(...jsonDropColumnsStatemets);
15207
15199
  jsonStatements.push(...jsonAlteredCompositePKs);
15208
15200
  jsonStatements.push(...jsonAlteredUniqueConstraints);
15209
15201
  jsonStatements.push(...dropEnums);
15210
15202
  jsonStatements.push(...dropSchemas);
15211
- const sqlStatements = fromJson(jsonStatements, "postgresql");
15203
+ const sqlStatements = fromJson(jsonStatements, "pg");
15212
15204
  const uniqueSqlStatements = [];
15213
15205
  sqlStatements.forEach((ss) => {
15214
15206
  if (!uniqueSqlStatements.includes(ss)) {
@@ -15346,8 +15338,8 @@ var init_snapshotsDiffer = __esm({
15346
15338
  const jsonDeletedUniqueConstraints = [];
15347
15339
  const jsonAlteredUniqueConstraints = [];
15348
15340
  const jsonRenameColumnsStatements = columnRenames.map((it) => prepareRenameColumns(it.table, "", it.renames)).flat();
15349
- const jsonAddColumnsStatemets = columnCreates.map((it) => _prepareAddColumns(it.table, "", it.columns)).flat();
15350
15341
  const jsonDropColumnsStatemets = columnDeletes.map((it) => _prepareDropColumns(it.table, "", it.columns)).flat();
15342
+ const jsonAddColumnsStatemets = columnDeletes.map((it) => _prepareAddColumns(it.table, "", it.columns)).flat();
15351
15343
  alteredTables.forEach((it) => {
15352
15344
  let addedColumns = [];
15353
15345
  for (const addedPkName of Object.keys(it.addedCompositePKs)) {
@@ -16088,7 +16080,7 @@ var init_sqlgenerator = __esm({
16088
16080
  };
16089
16081
  PgCreateTableConvertor = class extends Convertor {
16090
16082
  can(statement, dialect7) {
16091
- return statement.type === "create_table" && dialect7 === "postgresql";
16083
+ return statement.type === "create_table" && dialect7 === "pg";
16092
16084
  }
16093
16085
  convert(st) {
16094
16086
  const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints } = st;
@@ -16230,7 +16222,7 @@ var init_sqlgenerator = __esm({
16230
16222
  };
16231
16223
  PgAlterTableAddUniqueConstraintConvertor = class extends Convertor {
16232
16224
  can(statement, dialect7) {
16233
- return statement.type === "create_unique_constraint" && dialect7 === "postgresql";
16225
+ return statement.type === "create_unique_constraint" && dialect7 === "pg";
16234
16226
  }
16235
16227
  convert(statement) {
16236
16228
  const unsquashed = PgSquasher.unsquashUnique(statement.data);
@@ -16240,7 +16232,7 @@ var init_sqlgenerator = __esm({
16240
16232
  };
16241
16233
  PgAlterTableDropUniqueConstraintConvertor = class extends Convertor {
16242
16234
  can(statement, dialect7) {
16243
- return statement.type === "delete_unique_constraint" && dialect7 === "postgresql";
16235
+ return statement.type === "delete_unique_constraint" && dialect7 === "pg";
16244
16236
  }
16245
16237
  convert(statement) {
16246
16238
  const unsquashed = PgSquasher.unsquashUnique(statement.data);
@@ -16329,7 +16321,7 @@ var init_sqlgenerator = __esm({
16329
16321
  };
16330
16322
  PgDropTableConvertor = class extends Convertor {
16331
16323
  can(statement, dialect7) {
16332
- return statement.type === "drop_table" && dialect7 === "postgresql";
16324
+ return statement.type === "drop_table" && dialect7 === "pg";
16333
16325
  }
16334
16326
  convert(statement) {
16335
16327
  const { tableName, schema: schema4 } = statement;
@@ -16357,7 +16349,7 @@ var init_sqlgenerator = __esm({
16357
16349
  };
16358
16350
  PgRenameTableConvertor = class extends Convertor {
16359
16351
  can(statement, dialect7) {
16360
- return statement.type === "rename_table" && dialect7 === "postgresql";
16352
+ return statement.type === "rename_table" && dialect7 === "pg";
16361
16353
  }
16362
16354
  convert(statement) {
16363
16355
  const { tableNameFrom, tableNameTo, toSchema, fromSchema } = statement;
@@ -16388,7 +16380,7 @@ var init_sqlgenerator = __esm({
16388
16380
  };
16389
16381
  PgAlterTableRenameColumnConvertor = class extends Convertor {
16390
16382
  can(statement, dialect7) {
16391
- return statement.type === "alter_table_rename_column" && dialect7 === "postgresql";
16383
+ return statement.type === "alter_table_rename_column" && dialect7 === "pg";
16392
16384
  }
16393
16385
  convert(statement) {
16394
16386
  const { tableName, oldColumnName, newColumnName, schema: schema4 } = statement;
@@ -16416,7 +16408,7 @@ var init_sqlgenerator = __esm({
16416
16408
  };
16417
16409
  PgAlterTableDropColumnConvertor = class extends Convertor {
16418
16410
  can(statement, dialect7) {
16419
- return statement.type === "alter_table_drop_column" && dialect7 === "postgresql";
16411
+ return statement.type === "alter_table_drop_column" && dialect7 === "pg";
16420
16412
  }
16421
16413
  convert(statement) {
16422
16414
  const { tableName, columnName, schema: schema4 } = statement;
@@ -16444,7 +16436,7 @@ var init_sqlgenerator = __esm({
16444
16436
  };
16445
16437
  PgAlterTableAddColumnConvertor = class extends Convertor {
16446
16438
  can(statement, dialect7) {
16447
- return statement.type === "alter_table_add_column" && dialect7 === "postgresql";
16439
+ return statement.type === "alter_table_add_column" && dialect7 === "pg";
16448
16440
  }
16449
16441
  convert(statement) {
16450
16442
  const { tableName, column: column4, schema: schema4 } = statement;
@@ -16489,7 +16481,7 @@ var init_sqlgenerator = __esm({
16489
16481
  };
16490
16482
  PgAlterTableAlterColumnSetTypeConvertor = class extends Convertor {
16491
16483
  can(statement, dialect7) {
16492
- return statement.type === "alter_table_alter_column_set_type" && dialect7 === "postgresql";
16484
+ return statement.type === "alter_table_alter_column_set_type" && dialect7 === "pg";
16493
16485
  }
16494
16486
  convert(statement) {
16495
16487
  const { tableName, columnName, newDataType, schema: schema4 } = statement;
@@ -16514,7 +16506,7 @@ var init_sqlgenerator = __esm({
16514
16506
  };
16515
16507
  PgAlterTableAlterColumnSetDefaultConvertor = class extends Convertor {
16516
16508
  can(statement, dialect7) {
16517
- return statement.type === "alter_table_alter_column_set_default" && dialect7 === "postgresql";
16509
+ return statement.type === "alter_table_alter_column_set_default" && dialect7 === "pg";
16518
16510
  }
16519
16511
  convert(statement) {
16520
16512
  const { tableName, columnName, schema: schema4 } = statement;
@@ -16539,7 +16531,7 @@ var init_sqlgenerator = __esm({
16539
16531
  };
16540
16532
  PgAlterTableAlterColumnDropDefaultConvertor = class extends Convertor {
16541
16533
  can(statement, dialect7) {
16542
- return statement.type === "alter_table_alter_column_drop_default" && dialect7 === "postgresql";
16534
+ return statement.type === "alter_table_alter_column_drop_default" && dialect7 === "pg";
16543
16535
  }
16544
16536
  convert(statement) {
16545
16537
  const { tableName, columnName, schema: schema4 } = statement;
@@ -16651,7 +16643,7 @@ var init_sqlgenerator = __esm({
16651
16643
  };
16652
16644
  PgAlterTableCreateCompositePrimaryKeyConvertor = class extends Convertor {
16653
16645
  can(statement, dialect7) {
16654
- return statement.type === "create_composite_pk" && dialect7 === "postgresql";
16646
+ return statement.type === "create_composite_pk" && dialect7 === "pg";
16655
16647
  }
16656
16648
  convert(statement) {
16657
16649
  const { name, columns } = PgSquasher.unsquashPK(statement.data);
@@ -16661,7 +16653,7 @@ var init_sqlgenerator = __esm({
16661
16653
  };
16662
16654
  PgAlterTableDeleteCompositePrimaryKeyConvertor = class extends Convertor {
16663
16655
  can(statement, dialect7) {
16664
- return statement.type === "delete_composite_pk" && dialect7 === "postgresql";
16656
+ return statement.type === "delete_composite_pk" && dialect7 === "pg";
16665
16657
  }
16666
16658
  convert(statement) {
16667
16659
  const { name, columns } = PgSquasher.unsquashPK(statement.data);
@@ -16671,7 +16663,7 @@ var init_sqlgenerator = __esm({
16671
16663
  };
16672
16664
  PgAlterTableAlterCompositePrimaryKeyConvertor = class extends Convertor {
16673
16665
  can(statement, dialect7) {
16674
- return statement.type === "alter_composite_pk" && dialect7 === "postgresql";
16666
+ return statement.type === "alter_composite_pk" && dialect7 === "pg";
16675
16667
  }
16676
16668
  convert(statement) {
16677
16669
  const { name, columns } = PgSquasher.unsquashPK(statement.old);
@@ -16794,7 +16786,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16794
16786
  };
16795
16787
  PgAlterTableAlterColumnSetPrimaryKeyConvertor = class extends Convertor {
16796
16788
  can(statement, dialect7) {
16797
- return statement.type === "alter_table_alter_column_set_pk" && dialect7 === "postgresql";
16789
+ return statement.type === "alter_table_alter_column_set_pk" && dialect7 === "pg";
16798
16790
  }
16799
16791
  convert(statement) {
16800
16792
  const { tableName, columnName } = statement;
@@ -16804,7 +16796,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16804
16796
  };
16805
16797
  PgAlterTableAlterColumnDropPrimaryKeyConvertor = class extends Convertor {
16806
16798
  can(statement, dialect7) {
16807
- return statement.type === "alter_table_alter_column_drop_pk" && dialect7 === "postgresql";
16799
+ return statement.type === "alter_table_alter_column_drop_pk" && dialect7 === "pg";
16808
16800
  }
16809
16801
  convert(statement) {
16810
16802
  const { tableName, columnName, schema: schema4 } = statement;
@@ -16828,7 +16820,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16828
16820
  };
16829
16821
  PgAlterTableAlterColumnSetNotNullConvertor = class extends Convertor {
16830
16822
  can(statement, dialect7) {
16831
- return statement.type === "alter_table_alter_column_set_notnull" && dialect7 === "postgresql";
16823
+ return statement.type === "alter_table_alter_column_set_notnull" && dialect7 === "pg";
16832
16824
  }
16833
16825
  convert(statement) {
16834
16826
  const { tableName, columnName } = statement;
@@ -16883,7 +16875,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16883
16875
  };
16884
16876
  PgAlterTableAlterColumnDropNotNullConvertor = class extends Convertor {
16885
16877
  can(statement, dialect7) {
16886
- return statement.type === "alter_table_alter_column_drop_notnull" && dialect7 === "postgresql";
16878
+ return statement.type === "alter_table_alter_column_drop_notnull" && dialect7 === "pg";
16887
16879
  }
16888
16880
  convert(statement) {
16889
16881
  const { tableName, columnName } = statement;
@@ -16908,7 +16900,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16908
16900
  };
16909
16901
  PgCreateForeignKeyConvertor = class extends Convertor {
16910
16902
  can(statement, dialect7) {
16911
- return statement.type === "create_reference" && dialect7 === "postgresql";
16903
+ return statement.type === "create_reference" && dialect7 === "pg";
16912
16904
  }
16913
16905
  convert(statement) {
16914
16906
  const {
@@ -16973,7 +16965,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
16973
16965
  };
16974
16966
  PgAlterForeignKeyConvertor = class extends Convertor {
16975
16967
  can(statement, dialect7) {
16976
- return statement.type === "alter_reference" && dialect7 === "postgresql";
16968
+ return statement.type === "alter_reference" && dialect7 === "pg";
16977
16969
  }
16978
16970
  convert(statement) {
16979
16971
  const newFk = PgSquasher.unsquashFK(statement.data);
@@ -17012,7 +17004,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17012
17004
  };
17013
17005
  PgDeleteForeignKeyConvertor = class extends Convertor {
17014
17006
  can(statement, dialect7) {
17015
- return statement.type === "delete_reference" && dialect7 === "postgresql";
17007
+ return statement.type === "delete_reference" && dialect7 === "pg";
17016
17008
  }
17017
17009
  convert(statement) {
17018
17010
  const tableFrom = statement.tableName;
@@ -17049,7 +17041,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17049
17041
  };
17050
17042
  CreatePgIndexConvertor = class extends Convertor {
17051
17043
  can(statement, dialect7) {
17052
- return statement.type === "create_index" && dialect7 === "postgresql";
17044
+ return statement.type === "create_index" && dialect7 === "pg";
17053
17045
  }
17054
17046
  convert(statement) {
17055
17047
  const { name, columns, isUnique } = PgSquasher.unsquashIdx(statement.data);
@@ -17088,7 +17080,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17088
17080
  };
17089
17081
  PgDropIndexConvertor = class extends Convertor {
17090
17082
  can(statement, dialect7) {
17091
- return statement.type === "drop_index" && dialect7 === "postgresql";
17083
+ return statement.type === "drop_index" && dialect7 === "pg";
17092
17084
  }
17093
17085
  convert(statement) {
17094
17086
  const { name } = PgSquasher.unsquashIdx(statement.data);
@@ -17097,7 +17089,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17097
17089
  };
17098
17090
  PgCreateSchemaConvertor = class extends Convertor {
17099
17091
  can(statement, dialect7) {
17100
- return statement.type === "create_schema" && dialect7 === "postgresql";
17092
+ return statement.type === "create_schema" && dialect7 === "pg";
17101
17093
  }
17102
17094
  convert(statement) {
17103
17095
  const { name } = statement;
@@ -17107,7 +17099,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17107
17099
  };
17108
17100
  PgRenameSchemaConvertor = class extends Convertor {
17109
17101
  can(statement, dialect7) {
17110
- return statement.type === "rename_schema" && dialect7 === "postgresql";
17102
+ return statement.type === "rename_schema" && dialect7 === "pg";
17111
17103
  }
17112
17104
  convert(statement) {
17113
17105
  const { from, to } = statement;
@@ -17117,7 +17109,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17117
17109
  };
17118
17110
  PgDropSchemaConvertor = class extends Convertor {
17119
17111
  can(statement, dialect7) {
17120
- return statement.type === "drop_schema" && dialect7 === "postgresql";
17112
+ return statement.type === "drop_schema" && dialect7 === "pg";
17121
17113
  }
17122
17114
  convert(statement) {
17123
17115
  const { name } = statement;
@@ -17127,7 +17119,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17127
17119
  };
17128
17120
  PgAlterTableSetSchemaConvertor = class extends Convertor {
17129
17121
  can(statement, dialect7) {
17130
- return statement.type === "alter_table_set_schema" && dialect7 === "postgresql";
17122
+ return statement.type === "alter_table_set_schema" && dialect7 === "pg";
17131
17123
  }
17132
17124
  convert(statement) {
17133
17125
  const { tableName, schemaFrom, schemaTo } = statement;
@@ -17137,7 +17129,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17137
17129
  };
17138
17130
  PgAlterTableSetNewSchemaConvertor = class extends Convertor {
17139
17131
  can(statement, dialect7) {
17140
- return statement.type === "alter_table_set_new_schema" && dialect7 === "postgresql";
17132
+ return statement.type === "alter_table_set_new_schema" && dialect7 === "pg";
17141
17133
  }
17142
17134
  convert(statement) {
17143
17135
  const { tableName, to, from } = statement;
@@ -17148,7 +17140,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
17148
17140
  };
17149
17141
  PgAlterTableRemoveFromSchemaConvertor = class extends Convertor {
17150
17142
  can(statement, dialect7) {
17151
- return statement.type === "alter_table_remove_from_schema" && dialect7 === "postgresql";
17143
+ return statement.type === "alter_table_remove_from_schema" && dialect7 === "pg";
17152
17144
  }
17153
17145
  convert(statement) {
17154
17146
  const { tableName, schema: schema4 } = statement;
@@ -18928,7 +18920,7 @@ var pgSuggestions = async (db, statements) => {
18928
18920
  }
18929
18921
  }
18930
18922
  }
18931
- const stmnt = fromJson([statement], "postgresql")[0];
18923
+ const stmnt = fromJson([statement], "pg")[0];
18932
18924
  if (typeof stmnt !== "undefined") {
18933
18925
  if (statement.type === "drop_table") {
18934
18926
  statementsToExecute.push(