drizzle-kit 0.25.0-22c3e40 → 0.25.0-503ee01
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.d.mts +801 -0
- package/api.d.ts +801 -0
- package/api.js +2504 -385
- package/api.mjs +2504 -385
- package/bin.cjs +2613 -432
- package/package.json +1 -1
- package/utils.js +105 -18
- package/utils.mjs +105 -18
package/package.json
CHANGED
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(
|
413
|
-
this.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
|
-
|
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(
|
514
|
-
this.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(
|
533
|
+
function render2(view4) {
|
534
534
|
const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
|
535
|
-
if (
|
536
|
-
const terminal = new Terminal(
|
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(`${
|
540
|
+
stdout.write(`${view4}
|
541
541
|
`);
|
542
542
|
closable.close();
|
543
543
|
return;
|
544
544
|
}
|
545
545
|
exports2.render = render2;
|
546
|
-
function renderWithTask(
|
546
|
+
function renderWithTask(view4, task) {
|
547
547
|
return __awaiter(this, void 0, void 0, function* () {
|
548
|
-
const terminal = new TaskTerminal(
|
548
|
+
const terminal = new TaskTerminal(view4, process.stdout);
|
549
549
|
terminal.requestLayout();
|
550
550
|
const result = yield task;
|
551
551
|
terminal.clear();
|
@@ -4903,6 +4903,10 @@ var uniqueConstraint = objectType({
|
|
4903
4903
|
name: stringType(),
|
4904
4904
|
columns: stringType().array()
|
4905
4905
|
}).strict();
|
4906
|
+
var checkConstraint = objectType({
|
4907
|
+
name: stringType(),
|
4908
|
+
value: stringType()
|
4909
|
+
}).strict();
|
4906
4910
|
var tableV4 = objectType({
|
4907
4911
|
name: stringType(),
|
4908
4912
|
schema: stringType().optional(),
|
@@ -4916,8 +4920,20 @@ var table = objectType({
|
|
4916
4920
|
indexes: recordType(stringType(), index),
|
4917
4921
|
foreignKeys: recordType(stringType(), fk),
|
4918
4922
|
compositePrimaryKeys: recordType(stringType(), compositePK),
|
4919
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
|
4923
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
|
4924
|
+
checkConstraint: recordType(stringType(), checkConstraint).default({})
|
4925
|
+
}).strict();
|
4926
|
+
var viewMeta = objectType({
|
4927
|
+
algorithm: enumType(["undefined", "merge", "temptable"]),
|
4928
|
+
sqlSecurity: enumType(["definer", "invoker"]),
|
4929
|
+
withCheckOption: enumType(["local", "cascaded"]).optional()
|
4920
4930
|
}).strict();
|
4931
|
+
var view = objectType({
|
4932
|
+
name: stringType(),
|
4933
|
+
columns: recordType(stringType(), column),
|
4934
|
+
definition: stringType().optional(),
|
4935
|
+
isExisting: booleanType()
|
4936
|
+
}).strict().merge(viewMeta);
|
4921
4937
|
var kitInternals = objectType({
|
4922
4938
|
tables: recordType(
|
4923
4939
|
stringType(),
|
@@ -4970,6 +4986,7 @@ var schemaInternal = objectType({
|
|
4970
4986
|
version: literalType("5"),
|
4971
4987
|
dialect,
|
4972
4988
|
tables: recordType(stringType(), table),
|
4989
|
+
views: recordType(stringType(), view),
|
4973
4990
|
_meta: objectType({
|
4974
4991
|
tables: recordType(stringType(), stringType()),
|
4975
4992
|
columns: recordType(stringType(), stringType())
|
@@ -4993,12 +5010,19 @@ var tableSquashed = objectType({
|
|
4993
5010
|
indexes: recordType(stringType(), stringType()),
|
4994
5011
|
foreignKeys: recordType(stringType(), stringType()),
|
4995
5012
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
4996
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
5013
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
5014
|
+
checkConstraints: recordType(stringType(), stringType()).default({})
|
4997
5015
|
}).strict();
|
5016
|
+
var viewSquashed = view.omit({
|
5017
|
+
algorithm: true,
|
5018
|
+
sqlSecurity: true,
|
5019
|
+
withCheckOption: true
|
5020
|
+
}).extend({ meta: stringType() });
|
4998
5021
|
var schemaSquashed = objectType({
|
4999
5022
|
version: literalType("5"),
|
5000
5023
|
dialect,
|
5001
|
-
tables: recordType(stringType(), tableSquashed)
|
5024
|
+
tables: recordType(stringType(), tableSquashed),
|
5025
|
+
views: recordType(stringType(), viewSquashed)
|
5002
5026
|
}).strict();
|
5003
5027
|
var schemaSquashedV4 = objectType({
|
5004
5028
|
version: literalType("4"),
|
@@ -5016,6 +5040,7 @@ var dryMySql = mysqlSchema.parse({
|
|
5016
5040
|
prevId: "",
|
5017
5041
|
tables: {},
|
5018
5042
|
schemas: {},
|
5043
|
+
views: {},
|
5019
5044
|
_meta: {
|
5020
5045
|
schemas: {},
|
5021
5046
|
tables: {},
|
@@ -5181,6 +5206,10 @@ var column2 = objectType({
|
|
5181
5206
|
}).optional(),
|
5182
5207
|
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5183
5208
|
}).strict();
|
5209
|
+
var checkConstraint2 = objectType({
|
5210
|
+
name: stringType(),
|
5211
|
+
value: stringType()
|
5212
|
+
}).strict();
|
5184
5213
|
var columnSquashed = objectType({
|
5185
5214
|
name: stringType(),
|
5186
5215
|
type: stringType(),
|
@@ -5212,6 +5241,44 @@ var uniqueConstraint2 = objectType({
|
|
5212
5241
|
columns: stringType().array(),
|
5213
5242
|
nullsNotDistinct: booleanType()
|
5214
5243
|
}).strict();
|
5244
|
+
var viewWithOption = objectType({
|
5245
|
+
checkOption: enumType(["local", "cascaded"]).optional(),
|
5246
|
+
securityBarrier: booleanType().optional(),
|
5247
|
+
securityInvoker: booleanType().optional()
|
5248
|
+
}).strict();
|
5249
|
+
var matViewWithOption = objectType({
|
5250
|
+
fillfactor: numberType().optional(),
|
5251
|
+
toastTupleTarget: numberType().optional(),
|
5252
|
+
parallelWorkers: numberType().optional(),
|
5253
|
+
autovacuumEnabled: booleanType().optional(),
|
5254
|
+
vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
|
5255
|
+
vacuumTruncate: booleanType().optional(),
|
5256
|
+
autovacuumVacuumThreshold: numberType().optional(),
|
5257
|
+
autovacuumVacuumScaleFactor: numberType().optional(),
|
5258
|
+
autovacuumVacuumCostDelay: numberType().optional(),
|
5259
|
+
autovacuumVacuumCostLimit: numberType().optional(),
|
5260
|
+
autovacuumFreezeMinAge: numberType().optional(),
|
5261
|
+
autovacuumFreezeMaxAge: numberType().optional(),
|
5262
|
+
autovacuumFreezeTableAge: numberType().optional(),
|
5263
|
+
autovacuumMultixactFreezeMinAge: numberType().optional(),
|
5264
|
+
autovacuumMultixactFreezeMaxAge: numberType().optional(),
|
5265
|
+
autovacuumMultixactFreezeTableAge: numberType().optional(),
|
5266
|
+
logAutovacuumMinDuration: numberType().optional(),
|
5267
|
+
userCatalogTable: booleanType().optional()
|
5268
|
+
}).strict();
|
5269
|
+
var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
|
5270
|
+
var view2 = objectType({
|
5271
|
+
name: stringType(),
|
5272
|
+
schema: stringType(),
|
5273
|
+
columns: recordType(stringType(), column2),
|
5274
|
+
definition: stringType().optional(),
|
5275
|
+
materialized: booleanType(),
|
5276
|
+
with: mergedViewWithOption.optional(),
|
5277
|
+
isExisting: booleanType(),
|
5278
|
+
withNoData: booleanType().optional(),
|
5279
|
+
using: stringType().optional(),
|
5280
|
+
tablespace: stringType().optional()
|
5281
|
+
}).strict();
|
5215
5282
|
var tableV42 = objectType({
|
5216
5283
|
name: stringType(),
|
5217
5284
|
schema: stringType(),
|
@@ -5253,7 +5320,8 @@ var table2 = objectType({
|
|
5253
5320
|
indexes: recordType(stringType(), index2),
|
5254
5321
|
foreignKeys: recordType(stringType(), fk2),
|
5255
5322
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5256
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5323
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5324
|
+
checkConstraints: recordType(stringType(), checkConstraint2).default({})
|
5257
5325
|
}).strict();
|
5258
5326
|
var schemaHash2 = objectType({
|
5259
5327
|
id: stringType(),
|
@@ -5346,6 +5414,7 @@ var pgSchemaInternal = objectType({
|
|
5346
5414
|
tables: recordType(stringType(), table2),
|
5347
5415
|
enums: recordType(stringType(), enumSchema),
|
5348
5416
|
schemas: recordType(stringType(), stringType()),
|
5417
|
+
views: recordType(stringType(), view2).default({}),
|
5349
5418
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5350
5419
|
_meta: objectType({
|
5351
5420
|
schemas: recordType(stringType(), stringType()),
|
@@ -5361,7 +5430,8 @@ var tableSquashed2 = objectType({
|
|
5361
5430
|
indexes: recordType(stringType(), stringType()),
|
5362
5431
|
foreignKeys: recordType(stringType(), stringType()),
|
5363
5432
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5364
|
-
uniqueConstraints: recordType(stringType(), stringType())
|
5433
|
+
uniqueConstraints: recordType(stringType(), stringType()),
|
5434
|
+
checkConstraints: recordType(stringType(), stringType())
|
5365
5435
|
}).strict();
|
5366
5436
|
var tableSquashedV42 = objectType({
|
5367
5437
|
name: stringType(),
|
@@ -5390,6 +5460,7 @@ var pgSchemaSquashed = objectType({
|
|
5390
5460
|
tables: recordType(stringType(), tableSquashed2),
|
5391
5461
|
enums: recordType(stringType(), enumSchema),
|
5392
5462
|
schemas: recordType(stringType(), stringType()),
|
5463
|
+
views: recordType(stringType(), view2),
|
5393
5464
|
sequences: recordType(stringType(), sequenceSquashed)
|
5394
5465
|
}).strict();
|
5395
5466
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
@@ -5461,13 +5532,24 @@ var uniqueConstraint3 = objectType({
|
|
5461
5532
|
name: stringType(),
|
5462
5533
|
columns: stringType().array()
|
5463
5534
|
}).strict();
|
5535
|
+
var checkConstraint3 = objectType({
|
5536
|
+
name: stringType(),
|
5537
|
+
value: stringType()
|
5538
|
+
}).strict();
|
5464
5539
|
var table3 = objectType({
|
5465
5540
|
name: stringType(),
|
5466
5541
|
columns: recordType(stringType(), column3),
|
5467
5542
|
indexes: recordType(stringType(), index3),
|
5468
5543
|
foreignKeys: recordType(stringType(), fk3),
|
5469
5544
|
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5470
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5545
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
|
5546
|
+
checkConstraints: recordType(stringType(), checkConstraint3).default({})
|
5547
|
+
}).strict();
|
5548
|
+
var view3 = objectType({
|
5549
|
+
name: stringType(),
|
5550
|
+
columns: recordType(stringType(), column3),
|
5551
|
+
definition: stringType().optional(),
|
5552
|
+
isExisting: booleanType()
|
5471
5553
|
}).strict();
|
5472
5554
|
var dialect2 = enumType(["sqlite"]);
|
5473
5555
|
var schemaHash3 = objectType({
|
@@ -5484,6 +5566,7 @@ var schemaInternalV42 = objectType({
|
|
5484
5566
|
version: literalType("4"),
|
5485
5567
|
dialect: dialect2,
|
5486
5568
|
tables: recordType(stringType(), table3),
|
5569
|
+
views: recordType(stringType(), view3),
|
5487
5570
|
enums: objectType({})
|
5488
5571
|
}).strict();
|
5489
5572
|
var schemaInternalV52 = objectType({
|
@@ -5512,6 +5595,7 @@ var schemaInternal2 = objectType({
|
|
5512
5595
|
version: latestVersion,
|
5513
5596
|
dialect: dialect2,
|
5514
5597
|
tables: recordType(stringType(), table3),
|
5598
|
+
views: recordType(stringType(), view3),
|
5515
5599
|
enums: objectType({}),
|
5516
5600
|
_meta: objectType({
|
5517
5601
|
tables: recordType(stringType(), stringType()),
|
@@ -5529,12 +5613,14 @@ var tableSquashed3 = objectType({
|
|
5529
5613
|
indexes: recordType(stringType(), stringType()),
|
5530
5614
|
foreignKeys: recordType(stringType(), stringType()),
|
5531
5615
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5532
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
5616
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
5617
|
+
checkConstraints: recordType(stringType(), stringType()).default({})
|
5533
5618
|
}).strict();
|
5534
5619
|
var schemaSquashed2 = objectType({
|
5535
5620
|
version: latestVersion,
|
5536
5621
|
dialect: dialect2,
|
5537
5622
|
tables: recordType(stringType(), tableSquashed3),
|
5623
|
+
views: recordType(stringType(), view3),
|
5538
5624
|
enums: anyType()
|
5539
5625
|
}).strict();
|
5540
5626
|
var drySQLite = schema2.parse({
|
@@ -5543,6 +5629,7 @@ var drySQLite = schema2.parse({
|
|
5543
5629
|
id: originUUID,
|
5544
5630
|
prevId: "",
|
5545
5631
|
tables: {},
|
5632
|
+
views: {},
|
5546
5633
|
enums: {},
|
5547
5634
|
_meta: {
|
5548
5635
|
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(
|
414
|
-
this.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
|
-
|
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(
|
515
|
-
this.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(
|
534
|
+
function render2(view4) {
|
535
535
|
const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
|
536
|
-
if (
|
537
|
-
const terminal = new Terminal(
|
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(`${
|
541
|
+
stdout.write(`${view4}
|
542
542
|
`);
|
543
543
|
closable.close();
|
544
544
|
return;
|
545
545
|
}
|
546
546
|
exports.render = render2;
|
547
|
-
function renderWithTask(
|
547
|
+
function renderWithTask(view4, task) {
|
548
548
|
return __awaiter(this, void 0, void 0, function* () {
|
549
|
-
const terminal = new TaskTerminal(
|
549
|
+
const terminal = new TaskTerminal(view4, process.stdout);
|
550
550
|
terminal.requestLayout();
|
551
551
|
const result = yield task;
|
552
552
|
terminal.clear();
|
@@ -4881,6 +4881,10 @@ var uniqueConstraint = objectType({
|
|
4881
4881
|
name: stringType(),
|
4882
4882
|
columns: stringType().array()
|
4883
4883
|
}).strict();
|
4884
|
+
var checkConstraint = objectType({
|
4885
|
+
name: stringType(),
|
4886
|
+
value: stringType()
|
4887
|
+
}).strict();
|
4884
4888
|
var tableV4 = objectType({
|
4885
4889
|
name: stringType(),
|
4886
4890
|
schema: stringType().optional(),
|
@@ -4894,8 +4898,20 @@ var table = objectType({
|
|
4894
4898
|
indexes: recordType(stringType(), index),
|
4895
4899
|
foreignKeys: recordType(stringType(), fk),
|
4896
4900
|
compositePrimaryKeys: recordType(stringType(), compositePK),
|
4897
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
|
4901
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
|
4902
|
+
checkConstraint: recordType(stringType(), checkConstraint).default({})
|
4903
|
+
}).strict();
|
4904
|
+
var viewMeta = objectType({
|
4905
|
+
algorithm: enumType(["undefined", "merge", "temptable"]),
|
4906
|
+
sqlSecurity: enumType(["definer", "invoker"]),
|
4907
|
+
withCheckOption: enumType(["local", "cascaded"]).optional()
|
4898
4908
|
}).strict();
|
4909
|
+
var view = objectType({
|
4910
|
+
name: stringType(),
|
4911
|
+
columns: recordType(stringType(), column),
|
4912
|
+
definition: stringType().optional(),
|
4913
|
+
isExisting: booleanType()
|
4914
|
+
}).strict().merge(viewMeta);
|
4899
4915
|
var kitInternals = objectType({
|
4900
4916
|
tables: recordType(
|
4901
4917
|
stringType(),
|
@@ -4948,6 +4964,7 @@ var schemaInternal = objectType({
|
|
4948
4964
|
version: literalType("5"),
|
4949
4965
|
dialect,
|
4950
4966
|
tables: recordType(stringType(), table),
|
4967
|
+
views: recordType(stringType(), view),
|
4951
4968
|
_meta: objectType({
|
4952
4969
|
tables: recordType(stringType(), stringType()),
|
4953
4970
|
columns: recordType(stringType(), stringType())
|
@@ -4971,12 +4988,19 @@ var tableSquashed = objectType({
|
|
4971
4988
|
indexes: recordType(stringType(), stringType()),
|
4972
4989
|
foreignKeys: recordType(stringType(), stringType()),
|
4973
4990
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
4974
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
4991
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
4992
|
+
checkConstraints: recordType(stringType(), stringType()).default({})
|
4975
4993
|
}).strict();
|
4994
|
+
var viewSquashed = view.omit({
|
4995
|
+
algorithm: true,
|
4996
|
+
sqlSecurity: true,
|
4997
|
+
withCheckOption: true
|
4998
|
+
}).extend({ meta: stringType() });
|
4976
4999
|
var schemaSquashed = objectType({
|
4977
5000
|
version: literalType("5"),
|
4978
5001
|
dialect,
|
4979
|
-
tables: recordType(stringType(), tableSquashed)
|
5002
|
+
tables: recordType(stringType(), tableSquashed),
|
5003
|
+
views: recordType(stringType(), viewSquashed)
|
4980
5004
|
}).strict();
|
4981
5005
|
var schemaSquashedV4 = objectType({
|
4982
5006
|
version: literalType("4"),
|
@@ -4994,6 +5018,7 @@ var dryMySql = mysqlSchema.parse({
|
|
4994
5018
|
prevId: "",
|
4995
5019
|
tables: {},
|
4996
5020
|
schemas: {},
|
5021
|
+
views: {},
|
4997
5022
|
_meta: {
|
4998
5023
|
schemas: {},
|
4999
5024
|
tables: {},
|
@@ -5159,6 +5184,10 @@ var column2 = objectType({
|
|
5159
5184
|
}).optional(),
|
5160
5185
|
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5161
5186
|
}).strict();
|
5187
|
+
var checkConstraint2 = objectType({
|
5188
|
+
name: stringType(),
|
5189
|
+
value: stringType()
|
5190
|
+
}).strict();
|
5162
5191
|
var columnSquashed = objectType({
|
5163
5192
|
name: stringType(),
|
5164
5193
|
type: stringType(),
|
@@ -5190,6 +5219,44 @@ var uniqueConstraint2 = objectType({
|
|
5190
5219
|
columns: stringType().array(),
|
5191
5220
|
nullsNotDistinct: booleanType()
|
5192
5221
|
}).strict();
|
5222
|
+
var viewWithOption = objectType({
|
5223
|
+
checkOption: enumType(["local", "cascaded"]).optional(),
|
5224
|
+
securityBarrier: booleanType().optional(),
|
5225
|
+
securityInvoker: booleanType().optional()
|
5226
|
+
}).strict();
|
5227
|
+
var matViewWithOption = objectType({
|
5228
|
+
fillfactor: numberType().optional(),
|
5229
|
+
toastTupleTarget: numberType().optional(),
|
5230
|
+
parallelWorkers: numberType().optional(),
|
5231
|
+
autovacuumEnabled: booleanType().optional(),
|
5232
|
+
vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
|
5233
|
+
vacuumTruncate: booleanType().optional(),
|
5234
|
+
autovacuumVacuumThreshold: numberType().optional(),
|
5235
|
+
autovacuumVacuumScaleFactor: numberType().optional(),
|
5236
|
+
autovacuumVacuumCostDelay: numberType().optional(),
|
5237
|
+
autovacuumVacuumCostLimit: numberType().optional(),
|
5238
|
+
autovacuumFreezeMinAge: numberType().optional(),
|
5239
|
+
autovacuumFreezeMaxAge: numberType().optional(),
|
5240
|
+
autovacuumFreezeTableAge: numberType().optional(),
|
5241
|
+
autovacuumMultixactFreezeMinAge: numberType().optional(),
|
5242
|
+
autovacuumMultixactFreezeMaxAge: numberType().optional(),
|
5243
|
+
autovacuumMultixactFreezeTableAge: numberType().optional(),
|
5244
|
+
logAutovacuumMinDuration: numberType().optional(),
|
5245
|
+
userCatalogTable: booleanType().optional()
|
5246
|
+
}).strict();
|
5247
|
+
var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
|
5248
|
+
var view2 = objectType({
|
5249
|
+
name: stringType(),
|
5250
|
+
schema: stringType(),
|
5251
|
+
columns: recordType(stringType(), column2),
|
5252
|
+
definition: stringType().optional(),
|
5253
|
+
materialized: booleanType(),
|
5254
|
+
with: mergedViewWithOption.optional(),
|
5255
|
+
isExisting: booleanType(),
|
5256
|
+
withNoData: booleanType().optional(),
|
5257
|
+
using: stringType().optional(),
|
5258
|
+
tablespace: stringType().optional()
|
5259
|
+
}).strict();
|
5193
5260
|
var tableV42 = objectType({
|
5194
5261
|
name: stringType(),
|
5195
5262
|
schema: stringType(),
|
@@ -5231,7 +5298,8 @@ var table2 = objectType({
|
|
5231
5298
|
indexes: recordType(stringType(), index2),
|
5232
5299
|
foreignKeys: recordType(stringType(), fk2),
|
5233
5300
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5234
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5301
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5302
|
+
checkConstraints: recordType(stringType(), checkConstraint2).default({})
|
5235
5303
|
}).strict();
|
5236
5304
|
var schemaHash2 = objectType({
|
5237
5305
|
id: stringType(),
|
@@ -5324,6 +5392,7 @@ var pgSchemaInternal = objectType({
|
|
5324
5392
|
tables: recordType(stringType(), table2),
|
5325
5393
|
enums: recordType(stringType(), enumSchema),
|
5326
5394
|
schemas: recordType(stringType(), stringType()),
|
5395
|
+
views: recordType(stringType(), view2).default({}),
|
5327
5396
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5328
5397
|
_meta: objectType({
|
5329
5398
|
schemas: recordType(stringType(), stringType()),
|
@@ -5339,7 +5408,8 @@ var tableSquashed2 = objectType({
|
|
5339
5408
|
indexes: recordType(stringType(), stringType()),
|
5340
5409
|
foreignKeys: recordType(stringType(), stringType()),
|
5341
5410
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5342
|
-
uniqueConstraints: recordType(stringType(), stringType())
|
5411
|
+
uniqueConstraints: recordType(stringType(), stringType()),
|
5412
|
+
checkConstraints: recordType(stringType(), stringType())
|
5343
5413
|
}).strict();
|
5344
5414
|
var tableSquashedV42 = objectType({
|
5345
5415
|
name: stringType(),
|
@@ -5368,6 +5438,7 @@ var pgSchemaSquashed = objectType({
|
|
5368
5438
|
tables: recordType(stringType(), tableSquashed2),
|
5369
5439
|
enums: recordType(stringType(), enumSchema),
|
5370
5440
|
schemas: recordType(stringType(), stringType()),
|
5441
|
+
views: recordType(stringType(), view2),
|
5371
5442
|
sequences: recordType(stringType(), sequenceSquashed)
|
5372
5443
|
}).strict();
|
5373
5444
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
@@ -5439,13 +5510,24 @@ var uniqueConstraint3 = objectType({
|
|
5439
5510
|
name: stringType(),
|
5440
5511
|
columns: stringType().array()
|
5441
5512
|
}).strict();
|
5513
|
+
var checkConstraint3 = objectType({
|
5514
|
+
name: stringType(),
|
5515
|
+
value: stringType()
|
5516
|
+
}).strict();
|
5442
5517
|
var table3 = objectType({
|
5443
5518
|
name: stringType(),
|
5444
5519
|
columns: recordType(stringType(), column3),
|
5445
5520
|
indexes: recordType(stringType(), index3),
|
5446
5521
|
foreignKeys: recordType(stringType(), fk3),
|
5447
5522
|
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5448
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5523
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
|
5524
|
+
checkConstraints: recordType(stringType(), checkConstraint3).default({})
|
5525
|
+
}).strict();
|
5526
|
+
var view3 = objectType({
|
5527
|
+
name: stringType(),
|
5528
|
+
columns: recordType(stringType(), column3),
|
5529
|
+
definition: stringType().optional(),
|
5530
|
+
isExisting: booleanType()
|
5449
5531
|
}).strict();
|
5450
5532
|
var dialect2 = enumType(["sqlite"]);
|
5451
5533
|
var schemaHash3 = objectType({
|
@@ -5462,6 +5544,7 @@ var schemaInternalV42 = objectType({
|
|
5462
5544
|
version: literalType("4"),
|
5463
5545
|
dialect: dialect2,
|
5464
5546
|
tables: recordType(stringType(), table3),
|
5547
|
+
views: recordType(stringType(), view3),
|
5465
5548
|
enums: objectType({})
|
5466
5549
|
}).strict();
|
5467
5550
|
var schemaInternalV52 = objectType({
|
@@ -5490,6 +5573,7 @@ var schemaInternal2 = objectType({
|
|
5490
5573
|
version: latestVersion,
|
5491
5574
|
dialect: dialect2,
|
5492
5575
|
tables: recordType(stringType(), table3),
|
5576
|
+
views: recordType(stringType(), view3),
|
5493
5577
|
enums: objectType({}),
|
5494
5578
|
_meta: objectType({
|
5495
5579
|
tables: recordType(stringType(), stringType()),
|
@@ -5507,12 +5591,14 @@ var tableSquashed3 = objectType({
|
|
5507
5591
|
indexes: recordType(stringType(), stringType()),
|
5508
5592
|
foreignKeys: recordType(stringType(), stringType()),
|
5509
5593
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5510
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
5594
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
5595
|
+
checkConstraints: recordType(stringType(), stringType()).default({})
|
5511
5596
|
}).strict();
|
5512
5597
|
var schemaSquashed2 = objectType({
|
5513
5598
|
version: latestVersion,
|
5514
5599
|
dialect: dialect2,
|
5515
5600
|
tables: recordType(stringType(), tableSquashed3),
|
5601
|
+
views: recordType(stringType(), view3),
|
5516
5602
|
enums: anyType()
|
5517
5603
|
}).strict();
|
5518
5604
|
var drySQLite = schema2.parse({
|
@@ -5521,6 +5607,7 @@ var drySQLite = schema2.parse({
|
|
5521
5607
|
id: originUUID,
|
5522
5608
|
prevId: "",
|
5523
5609
|
tables: {},
|
5610
|
+
views: {},
|
5524
5611
|
enums: {},
|
5525
5612
|
_meta: {
|
5526
5613
|
tables: {},
|