drizzle-kit 0.25.0-662aa35 → 0.25.0-6764bd8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (10) hide show
  1. package/api.d.mts +719 -96
  2. package/api.d.ts +719 -96
  3. package/api.js +2417 -1726
  4. package/api.mjs +2417 -1726
  5. package/bin.cjs +2043 -1370
  6. package/index.d.mts +0 -7
  7. package/index.d.ts +0 -7
  8. package/package.json +2 -2
  9. package/utils.js +81 -30
  10. package/utils.mjs +81 -30
package/index.d.mts CHANGED
@@ -124,13 +124,6 @@ type Config = {
124
124
  introspect?: {
125
125
  casing: 'camel' | 'preserve';
126
126
  };
127
- entities?: {
128
- roles?: boolean | {
129
- provider?: string;
130
- exclude?: string[];
131
- include?: string[];
132
- }[];
133
- };
134
127
  } & ({
135
128
  dialect: Verify<Dialect, 'turso'>;
136
129
  dbCredentials: {
package/index.d.ts CHANGED
@@ -124,13 +124,6 @@ type Config = {
124
124
  introspect?: {
125
125
  casing: 'camel' | 'preserve';
126
126
  };
127
- entities?: {
128
- roles?: boolean | {
129
- provider?: string;
130
- exclude?: string[];
131
- include?: string[];
132
- }[];
133
- };
134
127
  } & ({
135
128
  dialect: Verify<Dialect, 'turso'>;
136
129
  dbCredentials: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.25.0-662aa35",
3
+ "version": "0.25.0-6764bd8",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
@@ -51,7 +51,7 @@
51
51
  "@arethetypeswrong/cli": "^0.15.3",
52
52
  "@aws-sdk/client-rds-data": "^3.556.0",
53
53
  "@cloudflare/workers-types": "^4.20230518.0",
54
- "@electric-sql/pglite": "^0.2.5",
54
+ "@electric-sql/pglite": "^0.1.5",
55
55
  "@hono/node-server": "^1.9.0",
56
56
  "@hono/zod-validator": "^0.2.1",
57
57
  "@libsql/client": "^0.10.0",
package/utils.js CHANGED
@@ -409,8 +409,8 @@ var require_hanji = __commonJS({
409
409
  };
410
410
  exports2.deferred = deferred;
411
411
  var Terminal = class {
412
- constructor(view, stdin, stdout, closable) {
413
- this.view = view;
412
+ constructor(view4, stdin, stdout, closable) {
413
+ this.view = view4;
414
414
  this.stdin = stdin;
415
415
  this.stdout = stdout;
416
416
  this.closable = closable;
@@ -448,7 +448,7 @@ var require_hanji = __commonJS({
448
448
  this.resolve({ status: "submitted", data: this.view.result() });
449
449
  return;
450
450
  }
451
- view.input(str, key);
451
+ view4.input(str, key);
452
452
  };
453
453
  this.stdin.on("keypress", keypress);
454
454
  this.view.attach(this);
@@ -510,8 +510,8 @@ var require_hanji = __commonJS({
510
510
  };
511
511
  exports2.TaskView = TaskView2;
512
512
  var TaskTerminal = class {
513
- constructor(view, stdout) {
514
- this.view = view;
513
+ constructor(view4, stdout) {
514
+ this.view = view4;
515
515
  this.stdout = stdout;
516
516
  this.text = "";
517
517
  this.view.attach(this);
@@ -530,22 +530,22 @@ var require_hanji = __commonJS({
530
530
  }
531
531
  };
532
532
  exports2.TaskTerminal = TaskTerminal;
533
- function render2(view) {
533
+ function render2(view4) {
534
534
  const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
535
- if (view instanceof Prompt2) {
536
- const terminal = new Terminal(view, stdin, stdout, closable);
535
+ if (view4 instanceof Prompt2) {
536
+ const terminal = new Terminal(view4, stdin, stdout, closable);
537
537
  terminal.requestLayout();
538
538
  return terminal.result();
539
539
  }
540
- stdout.write(`${view}
540
+ stdout.write(`${view4}
541
541
  `);
542
542
  closable.close();
543
543
  return;
544
544
  }
545
545
  exports2.render = render2;
546
- function renderWithTask(view, task) {
546
+ function renderWithTask(view4, task) {
547
547
  return __awaiter(this, void 0, void 0, function* () {
548
- const terminal = new TaskTerminal(view, process.stdout);
548
+ const terminal = new TaskTerminal(view4, process.stdout);
549
549
  terminal.requestLayout();
550
550
  const result = yield task;
551
551
  terminal.clear();
@@ -4918,6 +4918,17 @@ var table = objectType({
4918
4918
  compositePrimaryKeys: recordType(stringType(), compositePK),
4919
4919
  uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
4920
4920
  }).strict();
4921
+ var viewMeta = objectType({
4922
+ algorithm: enumType(["undefined", "merge", "temptable"]),
4923
+ sqlSecurity: enumType(["definer", "invoker"]),
4924
+ withCheckOption: enumType(["local", "cascaded"]).optional()
4925
+ }).strict();
4926
+ var view = objectType({
4927
+ name: stringType(),
4928
+ columns: recordType(stringType(), column),
4929
+ definition: stringType().optional(),
4930
+ isExisting: booleanType()
4931
+ }).strict().merge(viewMeta);
4921
4932
  var kitInternals = objectType({
4922
4933
  tables: recordType(
4923
4934
  stringType(),
@@ -4970,6 +4981,7 @@ var schemaInternal = objectType({
4970
4981
  version: literalType("5"),
4971
4982
  dialect,
4972
4983
  tables: recordType(stringType(), table),
4984
+ views: recordType(stringType(), view),
4973
4985
  _meta: objectType({
4974
4986
  tables: recordType(stringType(), stringType()),
4975
4987
  columns: recordType(stringType(), stringType())
@@ -4995,10 +5007,16 @@ var tableSquashed = objectType({
4995
5007
  compositePrimaryKeys: recordType(stringType(), stringType()),
4996
5008
  uniqueConstraints: recordType(stringType(), stringType()).default({})
4997
5009
  }).strict();
5010
+ var viewSquashed = view.omit({
5011
+ algorithm: true,
5012
+ sqlSecurity: true,
5013
+ withCheckOption: true
5014
+ }).extend({ meta: stringType() });
4998
5015
  var schemaSquashed = objectType({
4999
5016
  version: literalType("5"),
5000
5017
  dialect,
5001
- tables: recordType(stringType(), tableSquashed)
5018
+ tables: recordType(stringType(), tableSquashed),
5019
+ views: recordType(stringType(), viewSquashed)
5002
5020
  }).strict();
5003
5021
  var schemaSquashedV4 = objectType({
5004
5022
  version: literalType("4"),
@@ -5016,6 +5034,7 @@ var dryMySql = mysqlSchema.parse({
5016
5034
  prevId: "",
5017
5035
  tables: {},
5018
5036
  schemas: {},
5037
+ views: {},
5019
5038
  _meta: {
5020
5039
  schemas: {},
5021
5040
  tables: {},
@@ -5149,12 +5168,6 @@ var sequenceSchema = objectType({
5149
5168
  cycle: booleanType().optional(),
5150
5169
  schema: stringType()
5151
5170
  }).strict();
5152
- var roleSchema = objectType({
5153
- name: stringType(),
5154
- createDb: booleanType().optional(),
5155
- createRole: booleanType().optional(),
5156
- inherit: booleanType().optional()
5157
- }).strict();
5158
5171
  var sequenceSquashed = objectType({
5159
5172
  name: stringType(),
5160
5173
  schema: stringType(),
@@ -5218,13 +5231,43 @@ var uniqueConstraint2 = objectType({
5218
5231
  columns: stringType().array(),
5219
5232
  nullsNotDistinct: booleanType()
5220
5233
  }).strict();
5221
- var policy = objectType({
5234
+ var viewWithOption = objectType({
5235
+ checkOption: enumType(["local", "cascaded"]).optional(),
5236
+ securityBarrier: booleanType().optional(),
5237
+ securityInvoker: booleanType().optional()
5238
+ }).strict();
5239
+ var matViewWithOption = objectType({
5240
+ fillfactor: numberType().optional(),
5241
+ toastTupleTarget: numberType().optional(),
5242
+ parallelWorkers: numberType().optional(),
5243
+ autovacuumEnabled: booleanType().optional(),
5244
+ vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
5245
+ vacuumTruncate: booleanType().optional(),
5246
+ autovacuumVacuumThreshold: numberType().optional(),
5247
+ autovacuumVacuumScaleFactor: numberType().optional(),
5248
+ autovacuumVacuumCostDelay: numberType().optional(),
5249
+ autovacuumVacuumCostLimit: numberType().optional(),
5250
+ autovacuumFreezeMinAge: numberType().optional(),
5251
+ autovacuumFreezeMaxAge: numberType().optional(),
5252
+ autovacuumFreezeTableAge: numberType().optional(),
5253
+ autovacuumMultixactFreezeMinAge: numberType().optional(),
5254
+ autovacuumMultixactFreezeMaxAge: numberType().optional(),
5255
+ autovacuumMultixactFreezeTableAge: numberType().optional(),
5256
+ logAutovacuumMinDuration: numberType().optional(),
5257
+ userCatalogTable: booleanType().optional()
5258
+ }).strict();
5259
+ var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
5260
+ var view2 = objectType({
5222
5261
  name: stringType(),
5223
- as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
5224
- for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
5225
- to: stringType().array().optional(),
5262
+ schema: stringType(),
5263
+ columns: recordType(stringType(), column2),
5264
+ definition: stringType().optional(),
5265
+ materialized: booleanType(),
5266
+ with: mergedViewWithOption.optional(),
5267
+ isExisting: booleanType(),
5268
+ withNoData: booleanType().optional(),
5226
5269
  using: stringType().optional(),
5227
- withCheck: stringType().optional()
5270
+ tablespace: stringType().optional()
5228
5271
  }).strict();
5229
5272
  var tableV42 = objectType({
5230
5273
  name: stringType(),
@@ -5267,8 +5310,7 @@ var table2 = objectType({
5267
5310
  indexes: recordType(stringType(), index2),
5268
5311
  foreignKeys: recordType(stringType(), fk2),
5269
5312
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5270
- uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5271
- policies: recordType(stringType(), policy).default({})
5313
+ uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
5272
5314
  }).strict();
5273
5315
  var schemaHash2 = objectType({
5274
5316
  id: stringType(),
@@ -5361,8 +5403,8 @@ var pgSchemaInternal = objectType({
5361
5403
  tables: recordType(stringType(), table2),
5362
5404
  enums: recordType(stringType(), enumSchema),
5363
5405
  schemas: recordType(stringType(), stringType()),
5406
+ views: recordType(stringType(), view2).default({}),
5364
5407
  sequences: recordType(stringType(), sequenceSchema).default({}),
5365
- roles: recordType(stringType(), roleSchema).default({}),
5366
5408
  _meta: objectType({
5367
5409
  schemas: recordType(stringType(), stringType()),
5368
5410
  tables: recordType(stringType(), stringType()),
@@ -5377,8 +5419,7 @@ var tableSquashed2 = objectType({
5377
5419
  indexes: recordType(stringType(), stringType()),
5378
5420
  foreignKeys: recordType(stringType(), stringType()),
5379
5421
  compositePrimaryKeys: recordType(stringType(), stringType()),
5380
- uniqueConstraints: recordType(stringType(), stringType()),
5381
- policies: recordType(stringType(), stringType())
5422
+ uniqueConstraints: recordType(stringType(), stringType())
5382
5423
  }).strict();
5383
5424
  var tableSquashedV42 = objectType({
5384
5425
  name: stringType(),
@@ -5407,8 +5448,8 @@ var pgSchemaSquashed = objectType({
5407
5448
  tables: recordType(stringType(), tableSquashed2),
5408
5449
  enums: recordType(stringType(), enumSchema),
5409
5450
  schemas: recordType(stringType(), stringType()),
5410
- sequences: recordType(stringType(), sequenceSquashed),
5411
- roles: recordType(stringType(), roleSchema).default({})
5451
+ views: recordType(stringType(), view2),
5452
+ sequences: recordType(stringType(), sequenceSquashed)
5412
5453
  }).strict();
5413
5454
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
5414
5455
  var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
@@ -5487,6 +5528,12 @@ var table3 = objectType({
5487
5528
  compositePrimaryKeys: recordType(stringType(), compositePK3),
5488
5529
  uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
5489
5530
  }).strict();
5531
+ var view3 = objectType({
5532
+ name: stringType(),
5533
+ columns: recordType(stringType(), column3),
5534
+ definition: stringType().optional(),
5535
+ isExisting: booleanType()
5536
+ }).strict();
5490
5537
  var dialect2 = enumType(["sqlite"]);
5491
5538
  var schemaHash3 = objectType({
5492
5539
  id: stringType(),
@@ -5502,6 +5549,7 @@ var schemaInternalV42 = objectType({
5502
5549
  version: literalType("4"),
5503
5550
  dialect: dialect2,
5504
5551
  tables: recordType(stringType(), table3),
5552
+ views: recordType(stringType(), view3),
5505
5553
  enums: objectType({})
5506
5554
  }).strict();
5507
5555
  var schemaInternalV52 = objectType({
@@ -5530,6 +5578,7 @@ var schemaInternal2 = objectType({
5530
5578
  version: latestVersion,
5531
5579
  dialect: dialect2,
5532
5580
  tables: recordType(stringType(), table3),
5581
+ views: recordType(stringType(), view3),
5533
5582
  enums: objectType({}),
5534
5583
  _meta: objectType({
5535
5584
  tables: recordType(stringType(), stringType()),
@@ -5553,6 +5602,7 @@ var schemaSquashed2 = objectType({
5553
5602
  version: latestVersion,
5554
5603
  dialect: dialect2,
5555
5604
  tables: recordType(stringType(), tableSquashed3),
5605
+ views: recordType(stringType(), view3),
5556
5606
  enums: anyType()
5557
5607
  }).strict();
5558
5608
  var drySQLite = schema2.parse({
@@ -5561,6 +5611,7 @@ var drySQLite = schema2.parse({
5561
5611
  id: originUUID,
5562
5612
  prevId: "",
5563
5613
  tables: {},
5614
+ views: {},
5564
5615
  enums: {},
5565
5616
  _meta: {
5566
5617
  tables: {},
package/utils.mjs CHANGED
@@ -410,8 +410,8 @@ var require_hanji = __commonJS({
410
410
  };
411
411
  exports.deferred = deferred;
412
412
  var Terminal = class {
413
- constructor(view, stdin, stdout, closable) {
414
- this.view = view;
413
+ constructor(view4, stdin, stdout, closable) {
414
+ this.view = view4;
415
415
  this.stdin = stdin;
416
416
  this.stdout = stdout;
417
417
  this.closable = closable;
@@ -449,7 +449,7 @@ var require_hanji = __commonJS({
449
449
  this.resolve({ status: "submitted", data: this.view.result() });
450
450
  return;
451
451
  }
452
- view.input(str, key);
452
+ view4.input(str, key);
453
453
  };
454
454
  this.stdin.on("keypress", keypress);
455
455
  this.view.attach(this);
@@ -511,8 +511,8 @@ var require_hanji = __commonJS({
511
511
  };
512
512
  exports.TaskView = TaskView2;
513
513
  var TaskTerminal = class {
514
- constructor(view, stdout) {
515
- this.view = view;
514
+ constructor(view4, stdout) {
515
+ this.view = view4;
516
516
  this.stdout = stdout;
517
517
  this.text = "";
518
518
  this.view.attach(this);
@@ -531,22 +531,22 @@ var require_hanji = __commonJS({
531
531
  }
532
532
  };
533
533
  exports.TaskTerminal = TaskTerminal;
534
- function render2(view) {
534
+ function render2(view4) {
535
535
  const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
536
- if (view instanceof Prompt2) {
537
- const terminal = new Terminal(view, stdin, stdout, closable);
536
+ if (view4 instanceof Prompt2) {
537
+ const terminal = new Terminal(view4, stdin, stdout, closable);
538
538
  terminal.requestLayout();
539
539
  return terminal.result();
540
540
  }
541
- stdout.write(`${view}
541
+ stdout.write(`${view4}
542
542
  `);
543
543
  closable.close();
544
544
  return;
545
545
  }
546
546
  exports.render = render2;
547
- function renderWithTask(view, task) {
547
+ function renderWithTask(view4, task) {
548
548
  return __awaiter(this, void 0, void 0, function* () {
549
- const terminal = new TaskTerminal(view, process.stdout);
549
+ const terminal = new TaskTerminal(view4, process.stdout);
550
550
  terminal.requestLayout();
551
551
  const result = yield task;
552
552
  terminal.clear();
@@ -4896,6 +4896,17 @@ var table = objectType({
4896
4896
  compositePrimaryKeys: recordType(stringType(), compositePK),
4897
4897
  uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
4898
4898
  }).strict();
4899
+ var viewMeta = objectType({
4900
+ algorithm: enumType(["undefined", "merge", "temptable"]),
4901
+ sqlSecurity: enumType(["definer", "invoker"]),
4902
+ withCheckOption: enumType(["local", "cascaded"]).optional()
4903
+ }).strict();
4904
+ var view = objectType({
4905
+ name: stringType(),
4906
+ columns: recordType(stringType(), column),
4907
+ definition: stringType().optional(),
4908
+ isExisting: booleanType()
4909
+ }).strict().merge(viewMeta);
4899
4910
  var kitInternals = objectType({
4900
4911
  tables: recordType(
4901
4912
  stringType(),
@@ -4948,6 +4959,7 @@ var schemaInternal = objectType({
4948
4959
  version: literalType("5"),
4949
4960
  dialect,
4950
4961
  tables: recordType(stringType(), table),
4962
+ views: recordType(stringType(), view),
4951
4963
  _meta: objectType({
4952
4964
  tables: recordType(stringType(), stringType()),
4953
4965
  columns: recordType(stringType(), stringType())
@@ -4973,10 +4985,16 @@ var tableSquashed = objectType({
4973
4985
  compositePrimaryKeys: recordType(stringType(), stringType()),
4974
4986
  uniqueConstraints: recordType(stringType(), stringType()).default({})
4975
4987
  }).strict();
4988
+ var viewSquashed = view.omit({
4989
+ algorithm: true,
4990
+ sqlSecurity: true,
4991
+ withCheckOption: true
4992
+ }).extend({ meta: stringType() });
4976
4993
  var schemaSquashed = objectType({
4977
4994
  version: literalType("5"),
4978
4995
  dialect,
4979
- tables: recordType(stringType(), tableSquashed)
4996
+ tables: recordType(stringType(), tableSquashed),
4997
+ views: recordType(stringType(), viewSquashed)
4980
4998
  }).strict();
4981
4999
  var schemaSquashedV4 = objectType({
4982
5000
  version: literalType("4"),
@@ -4994,6 +5012,7 @@ var dryMySql = mysqlSchema.parse({
4994
5012
  prevId: "",
4995
5013
  tables: {},
4996
5014
  schemas: {},
5015
+ views: {},
4997
5016
  _meta: {
4998
5017
  schemas: {},
4999
5018
  tables: {},
@@ -5127,12 +5146,6 @@ var sequenceSchema = objectType({
5127
5146
  cycle: booleanType().optional(),
5128
5147
  schema: stringType()
5129
5148
  }).strict();
5130
- var roleSchema = objectType({
5131
- name: stringType(),
5132
- createDb: booleanType().optional(),
5133
- createRole: booleanType().optional(),
5134
- inherit: booleanType().optional()
5135
- }).strict();
5136
5149
  var sequenceSquashed = objectType({
5137
5150
  name: stringType(),
5138
5151
  schema: stringType(),
@@ -5196,13 +5209,43 @@ var uniqueConstraint2 = objectType({
5196
5209
  columns: stringType().array(),
5197
5210
  nullsNotDistinct: booleanType()
5198
5211
  }).strict();
5199
- var policy = objectType({
5212
+ var viewWithOption = objectType({
5213
+ checkOption: enumType(["local", "cascaded"]).optional(),
5214
+ securityBarrier: booleanType().optional(),
5215
+ securityInvoker: booleanType().optional()
5216
+ }).strict();
5217
+ var matViewWithOption = objectType({
5218
+ fillfactor: numberType().optional(),
5219
+ toastTupleTarget: numberType().optional(),
5220
+ parallelWorkers: numberType().optional(),
5221
+ autovacuumEnabled: booleanType().optional(),
5222
+ vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
5223
+ vacuumTruncate: booleanType().optional(),
5224
+ autovacuumVacuumThreshold: numberType().optional(),
5225
+ autovacuumVacuumScaleFactor: numberType().optional(),
5226
+ autovacuumVacuumCostDelay: numberType().optional(),
5227
+ autovacuumVacuumCostLimit: numberType().optional(),
5228
+ autovacuumFreezeMinAge: numberType().optional(),
5229
+ autovacuumFreezeMaxAge: numberType().optional(),
5230
+ autovacuumFreezeTableAge: numberType().optional(),
5231
+ autovacuumMultixactFreezeMinAge: numberType().optional(),
5232
+ autovacuumMultixactFreezeMaxAge: numberType().optional(),
5233
+ autovacuumMultixactFreezeTableAge: numberType().optional(),
5234
+ logAutovacuumMinDuration: numberType().optional(),
5235
+ userCatalogTable: booleanType().optional()
5236
+ }).strict();
5237
+ var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
5238
+ var view2 = objectType({
5200
5239
  name: stringType(),
5201
- as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
5202
- for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
5203
- to: stringType().array().optional(),
5240
+ schema: stringType(),
5241
+ columns: recordType(stringType(), column2),
5242
+ definition: stringType().optional(),
5243
+ materialized: booleanType(),
5244
+ with: mergedViewWithOption.optional(),
5245
+ isExisting: booleanType(),
5246
+ withNoData: booleanType().optional(),
5204
5247
  using: stringType().optional(),
5205
- withCheck: stringType().optional()
5248
+ tablespace: stringType().optional()
5206
5249
  }).strict();
5207
5250
  var tableV42 = objectType({
5208
5251
  name: stringType(),
@@ -5245,8 +5288,7 @@ var table2 = objectType({
5245
5288
  indexes: recordType(stringType(), index2),
5246
5289
  foreignKeys: recordType(stringType(), fk2),
5247
5290
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5248
- uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5249
- policies: recordType(stringType(), policy).default({})
5291
+ uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
5250
5292
  }).strict();
5251
5293
  var schemaHash2 = objectType({
5252
5294
  id: stringType(),
@@ -5339,8 +5381,8 @@ var pgSchemaInternal = objectType({
5339
5381
  tables: recordType(stringType(), table2),
5340
5382
  enums: recordType(stringType(), enumSchema),
5341
5383
  schemas: recordType(stringType(), stringType()),
5384
+ views: recordType(stringType(), view2).default({}),
5342
5385
  sequences: recordType(stringType(), sequenceSchema).default({}),
5343
- roles: recordType(stringType(), roleSchema).default({}),
5344
5386
  _meta: objectType({
5345
5387
  schemas: recordType(stringType(), stringType()),
5346
5388
  tables: recordType(stringType(), stringType()),
@@ -5355,8 +5397,7 @@ var tableSquashed2 = objectType({
5355
5397
  indexes: recordType(stringType(), stringType()),
5356
5398
  foreignKeys: recordType(stringType(), stringType()),
5357
5399
  compositePrimaryKeys: recordType(stringType(), stringType()),
5358
- uniqueConstraints: recordType(stringType(), stringType()),
5359
- policies: recordType(stringType(), stringType())
5400
+ uniqueConstraints: recordType(stringType(), stringType())
5360
5401
  }).strict();
5361
5402
  var tableSquashedV42 = objectType({
5362
5403
  name: stringType(),
@@ -5385,8 +5426,8 @@ var pgSchemaSquashed = objectType({
5385
5426
  tables: recordType(stringType(), tableSquashed2),
5386
5427
  enums: recordType(stringType(), enumSchema),
5387
5428
  schemas: recordType(stringType(), stringType()),
5388
- sequences: recordType(stringType(), sequenceSquashed),
5389
- roles: recordType(stringType(), roleSchema).default({})
5429
+ views: recordType(stringType(), view2),
5430
+ sequences: recordType(stringType(), sequenceSquashed)
5390
5431
  }).strict();
5391
5432
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
5392
5433
  var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
@@ -5465,6 +5506,12 @@ var table3 = objectType({
5465
5506
  compositePrimaryKeys: recordType(stringType(), compositePK3),
5466
5507
  uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
5467
5508
  }).strict();
5509
+ var view3 = objectType({
5510
+ name: stringType(),
5511
+ columns: recordType(stringType(), column3),
5512
+ definition: stringType().optional(),
5513
+ isExisting: booleanType()
5514
+ }).strict();
5468
5515
  var dialect2 = enumType(["sqlite"]);
5469
5516
  var schemaHash3 = objectType({
5470
5517
  id: stringType(),
@@ -5480,6 +5527,7 @@ var schemaInternalV42 = objectType({
5480
5527
  version: literalType("4"),
5481
5528
  dialect: dialect2,
5482
5529
  tables: recordType(stringType(), table3),
5530
+ views: recordType(stringType(), view3),
5483
5531
  enums: objectType({})
5484
5532
  }).strict();
5485
5533
  var schemaInternalV52 = objectType({
@@ -5508,6 +5556,7 @@ var schemaInternal2 = objectType({
5508
5556
  version: latestVersion,
5509
5557
  dialect: dialect2,
5510
5558
  tables: recordType(stringType(), table3),
5559
+ views: recordType(stringType(), view3),
5511
5560
  enums: objectType({}),
5512
5561
  _meta: objectType({
5513
5562
  tables: recordType(stringType(), stringType()),
@@ -5531,6 +5580,7 @@ var schemaSquashed2 = objectType({
5531
5580
  version: latestVersion,
5532
5581
  dialect: dialect2,
5533
5582
  tables: recordType(stringType(), tableSquashed3),
5583
+ views: recordType(stringType(), view3),
5534
5584
  enums: anyType()
5535
5585
  }).strict();
5536
5586
  var drySQLite = schema2.parse({
@@ -5539,6 +5589,7 @@ var drySQLite = schema2.parse({
5539
5589
  id: originUUID,
5540
5590
  prevId: "",
5541
5591
  tables: {},
5592
+ views: {},
5542
5593
  enums: {},
5543
5594
  _meta: {
5544
5595
  tables: {},