drizzle-kit 0.27.1-4d56096 → 0.27.1-93aad0e

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.
package/api.js CHANGED
@@ -7756,7 +7756,8 @@ var init_pgSchema = __esm({
7756
7756
  to: stringType().array().optional(),
7757
7757
  using: stringType().optional(),
7758
7758
  withCheck: stringType().optional(),
7759
- on: stringType().optional()
7759
+ on: stringType().optional(),
7760
+ schema: stringType().optional()
7760
7761
  }).strict();
7761
7762
  policySquashed = objectType({
7762
7763
  name: stringType(),
@@ -8091,6 +8092,16 @@ var init_pgSchema = __esm({
8091
8092
  squashPolicyPush: (policy4) => {
8092
8093
  return `${policy4.name}--${policy4.as}--${policy4.for}--${policy4.to?.join(",")}--${policy4.on}`;
8093
8094
  },
8095
+ unsquashPolicyPush: (policy4) => {
8096
+ const splitted = policy4.split("--");
8097
+ return {
8098
+ name: splitted[0],
8099
+ as: splitted[1],
8100
+ for: splitted[2],
8101
+ to: splitted[3].split(","),
8102
+ on: splitted[4] !== "undefined" ? splitted[4] : void 0
8103
+ };
8104
+ },
8094
8105
  squashPK: (pk) => {
8095
8106
  return `${pk.columns.join(",")};${pk.name}`;
8096
8107
  },
@@ -12053,9 +12064,9 @@ var init_sqlgenerator = __esm({
12053
12064
  can(statement, dialect4) {
12054
12065
  return statement.type === "alter_policy" && dialect4 === "postgresql";
12055
12066
  }
12056
- convert(statement) {
12057
- const newPolicy = PgSquasher.unsquashPolicy(statement.newData);
12058
- const oldPolicy = PgSquasher.unsquashPolicy(statement.oldData);
12067
+ convert(statement, _dialect, action) {
12068
+ const newPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(statement.newData) : PgSquasher.unsquashPolicy(statement.newData);
12069
+ const oldPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(statement.oldData) : PgSquasher.unsquashPolicy(statement.oldData);
12059
12070
  const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${statement.tableName}"` : `"${statement.tableName}"`;
12060
12071
  const usingPart = newPolicy.using ? ` USING (${newPolicy.using})` : oldPolicy.using ? ` USING (${oldPolicy.using})` : "";
12061
12072
  const withCheckPart = newPolicy.withCheck ? ` WITH CHECK (${newPolicy.withCheck})` : oldPolicy.withCheck ? ` WITH CHECK (${oldPolicy.withCheck})` : "";
@@ -12775,7 +12786,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
12775
12786
  can(statement, dialect4) {
12776
12787
  return statement.type === "drop_table" && dialect4 === "postgresql";
12777
12788
  }
12778
- convert(statement) {
12789
+ convert(statement, _d5, action) {
12779
12790
  const { tableName, schema: schema4, policies } = statement;
12780
12791
  const tableNameWithSchema = schema4 ? `"${schema4}"."${tableName}"` : `"${tableName}"`;
12781
12792
  const dropPolicyConvertor = new PgDropPolicyConvertor();
@@ -12783,7 +12794,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
12783
12794
  return dropPolicyConvertor.convert({
12784
12795
  type: "drop_policy",
12785
12796
  tableName,
12786
- data: PgSquasher.unsquashPolicy(p),
12797
+ data: action === "push" ? PgSquasher.unsquashPolicyPush(p) : PgSquasher.unsquashPolicy(p),
12787
12798
  schema: schema4
12788
12799
  });
12789
12800
  }) ?? [];
@@ -16770,8 +16781,10 @@ var init_snapshotsDiffer = __esm({
16770
16781
  const { renamed, created: created2, deleted: deleted2 } = await policyResolver2({
16771
16782
  tableName: entry.name,
16772
16783
  schema: entry.schema,
16773
- deleted: entry.policies.deleted.map(PgSquasher.unsquashPolicy),
16774
- created: entry.policies.added.map(PgSquasher.unsquashPolicy)
16784
+ deleted: entry.policies.deleted.map(
16785
+ action === "push" ? PgSquasher.unsquashPolicyPush : PgSquasher.unsquashPolicy
16786
+ ),
16787
+ created: entry.policies.added.map(action === "push" ? PgSquasher.unsquashPolicyPush : PgSquasher.unsquashPolicy)
16775
16788
  });
16776
16789
  if (created2.length > 0) {
16777
16790
  policyCreates.push({
@@ -16811,7 +16824,7 @@ var init_snapshotsDiffer = __esm({
16811
16824
  (policyKey, policy4) => {
16812
16825
  const rens = policyRenamesDict[`${tableValue.schema || "public"}.${tableValue.name}`] || [];
16813
16826
  const newName = columnChangeFor(policyKey, rens);
16814
- const unsquashedPolicy = PgSquasher.unsquashPolicy(policy4);
16827
+ const unsquashedPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(policy4) : PgSquasher.unsquashPolicy(policy4);
16815
16828
  unsquashedPolicy.name = newName;
16816
16829
  policy4 = PgSquasher.squashPolicy(unsquashedPolicy);
16817
16830
  return newName;
@@ -16825,8 +16838,12 @@ var init_snapshotsDiffer = __esm({
16825
16838
  const indPolicyCreates = [];
16826
16839
  const indPolicyDeletes = [];
16827
16840
  const { renamed: indPolicyRenames, created, deleted } = await indPolicyResolver2({
16828
- deleted: indPolicyRes.deleted.map((t) => PgSquasher.unsquashPolicy(t.values)),
16829
- created: indPolicyRes.added.map((t) => PgSquasher.unsquashPolicy(t.values))
16841
+ deleted: indPolicyRes.deleted.map(
16842
+ (t) => action === "push" ? PgSquasher.unsquashPolicyPush(t.values) : PgSquasher.unsquashPolicy(t.values)
16843
+ ),
16844
+ created: indPolicyRes.added.map(
16845
+ (t) => action === "push" ? PgSquasher.unsquashPolicyPush(t.values) : PgSquasher.unsquashPolicy(t.values)
16846
+ )
16830
16847
  });
16831
16848
  if (created.length > 0) {
16832
16849
  indPolicyCreates.push({
@@ -17101,9 +17118,9 @@ var init_snapshotsDiffer = __esm({
17101
17118
  );
17102
17119
  }
17103
17120
  typedResult.alteredPolicies.forEach(({ values }) => {
17104
- const policy4 = PgSquasher.unsquashPolicy(values);
17105
- const newPolicy = PgSquasher.unsquashPolicy(json22.policies[policy4.name].values);
17106
- const oldPolicy = PgSquasher.unsquashPolicy(json1.policies[policy4.name].values);
17121
+ const policy4 = action === "push" ? PgSquasher.unsquashPolicyPush(values) : PgSquasher.unsquashPolicy(values);
17122
+ const newPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(json22.policies[policy4.name].values) : PgSquasher.unsquashPolicy(json22.policies[policy4.name].values);
17123
+ const oldPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(json22.policies[policy4.name].values) : PgSquasher.unsquashPolicy(json1.policies[policy4.name].values);
17107
17124
  if (newPolicy.as !== oldPolicy.as) {
17108
17125
  jsonDropIndPoliciesStatements.push(
17109
17126
  ...prepareDropIndPolicyJsons(
@@ -17162,8 +17179,8 @@ var init_snapshotsDiffer = __esm({
17162
17179
  }
17163
17180
  alteredTables.forEach((it) => {
17164
17181
  Object.keys(it.alteredPolicies).forEach((policyName) => {
17165
- const newPolicy = PgSquasher.unsquashPolicy(it.alteredPolicies[policyName].__new);
17166
- const oldPolicy = PgSquasher.unsquashPolicy(it.alteredPolicies[policyName].__old);
17182
+ const newPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(it.alteredPolicies[policyName].__new) : PgSquasher.unsquashPolicy(it.alteredPolicies[policyName].__new);
17183
+ const oldPolicy = action === "push" ? PgSquasher.unsquashPolicyPush(it.alteredPolicies[policyName].__old) : PgSquasher.unsquashPolicy(it.alteredPolicies[policyName].__old);
17167
17184
  if (newPolicy.as !== oldPolicy.as) {
17168
17185
  jsonDropPoliciesStatements.push(
17169
17186
  ...prepareDropPolicyJsons(
@@ -17217,7 +17234,8 @@ var init_snapshotsDiffer = __esm({
17217
17234
  if (policiesInPreviousState.length > 0 && policiesInCurrentState.length === 0 && !table4.isRLSEnabled) {
17218
17235
  jsonDisableRLSStatements.push({ type: "disable_rls", tableName: table4.name, schema: table4.schema });
17219
17236
  }
17220
- if (table4.isRLSEnabled !== tableInPreviousState.isRLSEnabled) {
17237
+ const wasRlsEnabled = tableInPreviousState ? tableInPreviousState.isRLSEnabled : false;
17238
+ if (table4.isRLSEnabled !== wasRlsEnabled) {
17221
17239
  if (table4.isRLSEnabled) {
17222
17240
  jsonEnableRLSStatements.push({ type: "enable_rls", tableName: table4.name, schema: table4.schema });
17223
17241
  } else if (!table4.isRLSEnabled && policiesInCurrentState.length === 0) {
@@ -17344,7 +17362,11 @@ var init_snapshotsDiffer = __esm({
17344
17362
  });
17345
17363
  jsonCreatePoliciesStatements.push(...[].concat(
17346
17364
  ...createdTables.map(
17347
- (it) => prepareCreatePolicyJsons(it.name, it.schema, Object.values(it.policies).map(PgSquasher.unsquashPolicy))
17365
+ (it) => prepareCreatePolicyJsons(
17366
+ it.name,
17367
+ it.schema,
17368
+ Object.values(it.policies).map(action === "push" ? PgSquasher.unsquashPolicyPush : PgSquasher.unsquashPolicy)
17369
+ )
17348
17370
  )
17349
17371
  ));
17350
17372
  const createViews = [];
@@ -17559,7 +17581,7 @@ var init_snapshotsDiffer = __esm({
17559
17581
  }
17560
17582
  return true;
17561
17583
  });
17562
- const sqlStatements = fromJson(filteredEnumsJsonStatements, "postgresql");
17584
+ const sqlStatements = fromJson(filteredEnumsJsonStatements, "postgresql", action);
17563
17585
  const uniqueSqlStatements = [];
17564
17586
  sqlStatements.forEach((ss) => {
17565
17587
  if (!uniqueSqlStatements.includes(ss)) {
@@ -28824,6 +28846,7 @@ ${withStyle.errorWarning(
28824
28846
  } else {
28825
28847
  policiesToReturn[policy4.name] = {
28826
28848
  ...mappedPolicy,
28849
+ schema: tableConfig.schema ?? "public",
28827
28850
  on: `"${tableConfig.schema ?? "public"}"."${tableConfig.name}"`
28828
28851
  };
28829
28852
  }
@@ -29032,9 +29055,10 @@ ${withStyle.errorWarning(
29032
29055
  while (end > start && str[end - 1] === char3) --end;
29033
29056
  return start > 0 || end < str.length ? str.substring(start, end) : str.toString();
29034
29057
  };
29035
- fromDatabase = async (db, tablesFilter = () => true, schemaFilters, entities, progressCallback) => {
29058
+ fromDatabase = async (db, tablesFilter = () => true, schemaFilters, entities, progressCallback, tsSchema) => {
29036
29059
  const result = {};
29037
29060
  const views = {};
29061
+ const policies = {};
29038
29062
  const internals = { tables: {} };
29039
29063
  const where = schemaFilters.map((t) => `n.nspname = '${t}'`).join(" or ");
29040
29064
  const allTables = await db.query(
@@ -29160,7 +29184,8 @@ WHERE
29160
29184
  }
29161
29185
  }
29162
29186
  }
29163
- const wherePolicies = schemaFilters.map((t) => `schemaname = '${t}'`).join(" or ");
29187
+ const schemasForLinkedPoliciesInSchema = Object.values(tsSchema?.policies ?? {}).map((it) => it.schema);
29188
+ const wherePolicies = [...schemaFilters, ...schemasForLinkedPoliciesInSchema].map((t) => `schemaname = '${t}'`).join(" or ");
29164
29189
  const policiesByTable = {};
29165
29190
  const allPolicies = await db.query(`SELECT schemaname, tablename, policyname as name, permissive as "as", roles as to, cmd as for, qual as using, with_check as "withCheck" FROM pg_policies${wherePolicies === "" ? "" : ` WHERE ${wherePolicies}`};`);
29166
29191
  for (const dbPolicy of allPolicies) {
@@ -29176,6 +29201,15 @@ WHERE
29176
29201
  [dbPolicy.name]: { ...rest, to: parsedTo, withCheck: parsedWithCheck, using: parsedUsing }
29177
29202
  };
29178
29203
  }
29204
+ if (tsSchema?.policies[dbPolicy.name]) {
29205
+ policies[dbPolicy.name] = {
29206
+ ...rest,
29207
+ to: parsedTo,
29208
+ withCheck: parsedWithCheck,
29209
+ using: parsedUsing,
29210
+ on: tsSchema?.policies[dbPolicy.name].on
29211
+ };
29212
+ }
29179
29213
  }
29180
29214
  if (progressCallback) {
29181
29215
  progressCallback(
@@ -29768,7 +29802,7 @@ WHERE
29768
29802
  schemas: schemasObject,
29769
29803
  sequences: sequencesToReturn,
29770
29804
  roles: rolesToReturn,
29771
- policies: {},
29805
+ policies,
29772
29806
  views,
29773
29807
  _meta: {
29774
29808
  schemas: {},
@@ -30212,7 +30246,7 @@ var init_blob = __esm({
30212
30246
  return "blob";
30213
30247
  }
30214
30248
  mapFromDriverValue(value) {
30215
- return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
30249
+ return BigInt(value.toString());
30216
30250
  }
30217
30251
  mapToDriverValue(value) {
30218
30252
  return Buffer.from(value.toString());
@@ -30237,7 +30271,7 @@ var init_blob = __esm({
30237
30271
  return "blob";
30238
30272
  }
30239
30273
  mapFromDriverValue(value) {
30240
- return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
30274
+ return JSON.parse(value.toString());
30241
30275
  }
30242
30276
  mapToDriverValue(value) {
30243
30277
  return Buffer.from(JSON.stringify(value));
@@ -34057,25 +34091,6 @@ WHERE
34057
34091
  }
34058
34092
  });
34059
34093
 
34060
- // src/extensions/getTablesFilterByExtensions.ts
34061
- var getTablesFilterByExtensions;
34062
- var init_getTablesFilterByExtensions = __esm({
34063
- "src/extensions/getTablesFilterByExtensions.ts"() {
34064
- "use strict";
34065
- getTablesFilterByExtensions = ({
34066
- extensionsFilters,
34067
- dialect: dialect4
34068
- }) => {
34069
- if (extensionsFilters) {
34070
- if (extensionsFilters.includes("postgis") && dialect4 === "postgresql") {
34071
- return ["!geography_columns", "!geometry_columns", "!spatial_ref_sys"];
34072
- }
34073
- }
34074
- return [];
34075
- };
34076
- }
34077
- });
34078
-
34079
34094
  // ../drizzle-orm/dist/mysql-core/alias.js
34080
34095
  var init_alias4 = __esm({
34081
34096
  "../drizzle-orm/dist/mysql-core/alias.js"() {
@@ -34698,7 +34713,7 @@ var init_datetime = __esm({
34698
34713
  // ../drizzle-orm/dist/mysql-core/columns/decimal.js
34699
34714
  function decimal(a, b = {}) {
34700
34715
  const { name: name2, config } = getColumnNameAndConfig(a, b);
34701
- return new MySqlDecimalBuilder(name2, config);
34716
+ return new MySqlDecimalBuilder(name2, config.precision, config.scale);
34702
34717
  }
34703
34718
  var _a259, _b182, MySqlDecimalBuilder, _a260, _b183, MySqlDecimal;
34704
34719
  var init_decimal = __esm({
@@ -34708,11 +34723,10 @@ var init_decimal = __esm({
34708
34723
  init_utils2();
34709
34724
  init_common4();
34710
34725
  MySqlDecimalBuilder = class extends (_b182 = MySqlColumnBuilderWithAutoIncrement, _a259 = entityKind, _b182) {
34711
- constructor(name2, config) {
34726
+ constructor(name2, precision, scale) {
34712
34727
  super(name2, "string", "MySqlDecimal");
34713
- this.config.precision = config?.precision;
34714
- this.config.scale = config?.scale;
34715
- this.config.unsigned = config?.unsigned;
34728
+ this.config.precision = precision;
34729
+ this.config.scale = scale;
34716
34730
  }
34717
34731
  /** @internal */
34718
34732
  build(table4) {
@@ -34728,19 +34742,15 @@ var init_decimal = __esm({
34728
34742
  super(...arguments);
34729
34743
  __publicField(this, "precision", this.config.precision);
34730
34744
  __publicField(this, "scale", this.config.scale);
34731
- __publicField(this, "unsigned", this.config.unsigned);
34732
34745
  }
34733
34746
  getSQLType() {
34734
- let type = "";
34735
34747
  if (this.precision !== void 0 && this.scale !== void 0) {
34736
- type += `decimal(${this.precision},${this.scale})`;
34748
+ return `decimal(${this.precision},${this.scale})`;
34737
34749
  } else if (this.precision === void 0) {
34738
- type += "decimal";
34750
+ return "decimal";
34739
34751
  } else {
34740
- type += `decimal(${this.precision})`;
34752
+ return `decimal(${this.precision})`;
34741
34753
  }
34742
- type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
34743
- return this.unsigned ? `${type} unsigned` : type;
34744
34754
  }
34745
34755
  };
34746
34756
  __publicField(MySqlDecimal, _a260, "MySqlDecimal");
@@ -34764,7 +34774,6 @@ var init_double = __esm({
34764
34774
  super(name2, "number", "MySqlDouble");
34765
34775
  this.config.precision = config?.precision;
34766
34776
  this.config.scale = config?.scale;
34767
- this.config.unsigned = config?.unsigned;
34768
34777
  }
34769
34778
  /** @internal */
34770
34779
  build(table4) {
@@ -34777,18 +34786,15 @@ var init_double = __esm({
34777
34786
  super(...arguments);
34778
34787
  __publicField(this, "precision", this.config.precision);
34779
34788
  __publicField(this, "scale", this.config.scale);
34780
- __publicField(this, "unsigned", this.config.unsigned);
34781
34789
  }
34782
34790
  getSQLType() {
34783
- let type = "";
34784
34791
  if (this.precision !== void 0 && this.scale !== void 0) {
34785
- type += `double(${this.precision},${this.scale})`;
34792
+ return `double(${this.precision},${this.scale})`;
34786
34793
  } else if (this.precision === void 0) {
34787
- type += "double";
34794
+ return "double";
34788
34795
  } else {
34789
- type += `double(${this.precision})`;
34796
+ return `double(${this.precision})`;
34790
34797
  }
34791
- return this.unsigned ? `${type} unsigned` : type;
34792
34798
  }
34793
34799
  };
34794
34800
  __publicField(MySqlDouble, _a262, "MySqlDouble");
@@ -34838,23 +34844,18 @@ var init_enum2 = __esm({
34838
34844
  });
34839
34845
 
34840
34846
  // ../drizzle-orm/dist/mysql-core/columns/float.js
34841
- function float(a, b) {
34842
- const { name: name2, config } = getColumnNameAndConfig(a, b);
34843
- return new MySqlFloatBuilder(name2, config);
34847
+ function float(name2) {
34848
+ return new MySqlFloatBuilder(name2 ?? "");
34844
34849
  }
34845
34850
  var _a265, _b188, MySqlFloatBuilder, _a266, _b189, MySqlFloat;
34846
34851
  var init_float = __esm({
34847
34852
  "../drizzle-orm/dist/mysql-core/columns/float.js"() {
34848
34853
  "use strict";
34849
34854
  init_entity();
34850
- init_utils2();
34851
34855
  init_common4();
34852
34856
  MySqlFloatBuilder = class extends (_b188 = MySqlColumnBuilderWithAutoIncrement, _a265 = entityKind, _b188) {
34853
- constructor(name2, config) {
34857
+ constructor(name2) {
34854
34858
  super(name2, "number", "MySqlFloat");
34855
- this.config.precision = config?.precision;
34856
- this.config.scale = config?.scale;
34857
- this.config.unsigned = config?.unsigned;
34858
34859
  }
34859
34860
  /** @internal */
34860
34861
  build(table4) {
@@ -34863,22 +34864,8 @@ var init_float = __esm({
34863
34864
  };
34864
34865
  __publicField(MySqlFloatBuilder, _a265, "MySqlFloatBuilder");
34865
34866
  MySqlFloat = class extends (_b189 = MySqlColumnWithAutoIncrement, _a266 = entityKind, _b189) {
34866
- constructor() {
34867
- super(...arguments);
34868
- __publicField(this, "precision", this.config.precision);
34869
- __publicField(this, "scale", this.config.scale);
34870
- __publicField(this, "unsigned", this.config.unsigned);
34871
- }
34872
34867
  getSQLType() {
34873
- let type = "";
34874
- if (this.precision !== void 0 && this.scale !== void 0) {
34875
- type += `float(${this.precision},${this.scale})`;
34876
- } else if (this.precision === void 0) {
34877
- type += "float";
34878
- } else {
34879
- type += `float(${this.precision})`;
34880
- }
34881
- return this.unsigned ? `${type} unsigned` : type;
34868
+ return "float";
34882
34869
  }
34883
34870
  };
34884
34871
  __publicField(MySqlFloat, _a266, "MySqlFloat");
@@ -38870,8 +38857,8 @@ ${withStyle.errorWarning(
38870
38857
  changedType = columnType.replace("bigint unsigned", "serial");
38871
38858
  }
38872
38859
  }
38873
- if (columnType.includes("decimal(10,0)")) {
38874
- changedType = columnType.replace("decimal(10,0)", "decimal");
38860
+ if (columnType.startsWith("tinyint")) {
38861
+ changedType = "tinyint";
38875
38862
  }
38876
38863
  let onUpdate = void 0;
38877
38864
  if (columnType.startsWith("timestamp") && typeof columnExtra !== "undefined" && columnExtra.includes("on update CURRENT_TIMESTAMP")) {
@@ -39393,7 +39380,6 @@ var init_utils9 = __esm({
39393
39380
  "use strict";
39394
39381
  import_hanji7 = __toESM(require_hanji());
39395
39382
  init_lib();
39396
- init_getTablesFilterByExtensions();
39397
39383
  init_global();
39398
39384
  init_schemaValidator();
39399
39385
  init_serializer();
@@ -39916,7 +39902,7 @@ init_mjs();
39916
39902
  init_global();
39917
39903
  init_pgSerializer();
39918
39904
  init_views();
39919
- var pgPushIntrospect = async (db, filters, schemaFilters, entities) => {
39905
+ var pgPushIntrospect = async (db, filters, schemaFilters, entities, tsSchema) => {
39920
39906
  const matchers = filters.map((it) => {
39921
39907
  return new Minimatch(it);
39922
39908
  });
@@ -39944,7 +39930,7 @@ var pgPushIntrospect = async (db, filters, schemaFilters, entities) => {
39944
39930
  );
39945
39931
  const res = await (0, import_hanji3.renderWithTask)(
39946
39932
  progress,
39947
- fromDatabase(db, filter2, schemaFilters, entities)
39933
+ fromDatabase(db, filter2, schemaFilters, entities, void 0, tsSchema)
39948
39934
  );
39949
39935
  const schema4 = { id: originUUID, prevId: "", ...res };
39950
39936
  const { internal, ...schemaWithoutInternals } = schema4;
@@ -40112,7 +40098,7 @@ var pgSuggestions = async (db, statements) => {
40112
40098
  }
40113
40099
  }
40114
40100
  }
40115
- const stmnt = fromJson([statement], "postgresql");
40101
+ const stmnt = fromJson([statement], "postgresql", "push");
40116
40102
  if (typeof stmnt !== "undefined") {
40117
40103
  statementsToExecute.push(...stmnt);
40118
40104
  }
@@ -40350,7 +40336,6 @@ var sqlitePushIntrospect = async (db, filters) => {
40350
40336
 
40351
40337
  // src/api.ts
40352
40338
  init_sqlitePushUtils();
40353
- init_getTablesFilterByExtensions();
40354
40339
  init_global();
40355
40340
  init_migrationPreparator();
40356
40341
  init_mysqlSchema();
@@ -40404,12 +40389,9 @@ var generateMigration = async (prev, cur) => {
40404
40389
  );
40405
40390
  return sqlStatements;
40406
40391
  };
40407
- var pushSchema = async (imports, drizzleInstance, schemaFilters, tablesFilter, extensionsFilters) => {
40392
+ var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
40408
40393
  const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
40409
40394
  const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
40410
- const filters = (tablesFilter ?? []).concat(
40411
- getTablesFilterByExtensions({ extensionsFilters, dialect: "postgresql" })
40412
- );
40413
40395
  const db = {
40414
40396
  query: async (query, params) => {
40415
40397
  const res = await drizzleInstance.execute(sql2.raw(query));
@@ -40419,7 +40401,7 @@ var pushSchema = async (imports, drizzleInstance, schemaFilters, tablesFilter, e
40419
40401
  const cur = generateDrizzleJson(imports);
40420
40402
  const { schema: prev } = await pgPushIntrospect(
40421
40403
  db,
40422
- filters,
40404
+ [],
40423
40405
  schemaFilters ?? ["public"],
40424
40406
  void 0
40425
40407
  );