drizzle-kit 0.30.4 → 0.30.5
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 +13 -13
- package/api.d.ts +13 -13
- package/api.js +2301 -1984
- package/api.mjs +2301 -1984
- package/bin.cjs +21238 -7264
- package/{index-Z-1TKnbX.d.mts → index-BAUrj6Ib.d.mts} +15 -2
- package/{index-Z-1TKnbX.d.ts → index-BAUrj6Ib.d.ts} +15 -2
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/package.json +4 -3
- package/utils.js +469 -209
- package/utils.mjs +469 -209
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(view5, stdin, stdout, closable) {
|
413
|
+
this.view = view5;
|
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
|
+
view5.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(view5, stdout) {
|
514
|
+
this.view = view5;
|
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(view5) {
|
534
534
|
const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
|
535
|
-
if (
|
536
|
-
const terminal = new Terminal(
|
535
|
+
if (view5 instanceof Prompt2) {
|
536
|
+
const terminal = new Terminal(view5, stdin, stdout, closable);
|
537
537
|
terminal.requestLayout();
|
538
538
|
return terminal.result();
|
539
539
|
}
|
540
|
-
stdout.write(`${
|
540
|
+
stdout.write(`${view5}
|
541
541
|
`);
|
542
542
|
closable.close();
|
543
543
|
return;
|
544
544
|
}
|
545
545
|
exports2.render = render2;
|
546
|
-
function renderWithTask(
|
546
|
+
function renderWithTask(view5, task) {
|
547
547
|
return __awaiter(this, void 0, void 0, function* () {
|
548
|
-
const terminal = new TaskTerminal(
|
548
|
+
const terminal = new TaskTerminal(view5, process.stdout);
|
549
549
|
terminal.requestLayout();
|
550
550
|
const result = yield task;
|
551
551
|
terminal.clear();
|
@@ -899,30 +899,30 @@ var supports_color_default = supportsColor;
|
|
899
899
|
|
900
900
|
// ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
901
901
|
function stringReplaceAll(string, substring, replacer) {
|
902
|
-
let
|
903
|
-
if (
|
902
|
+
let index6 = string.indexOf(substring);
|
903
|
+
if (index6 === -1) {
|
904
904
|
return string;
|
905
905
|
}
|
906
906
|
const substringLength = substring.length;
|
907
907
|
let endIndex = 0;
|
908
908
|
let returnValue = "";
|
909
909
|
do {
|
910
|
-
returnValue += string.slice(endIndex,
|
911
|
-
endIndex =
|
912
|
-
|
913
|
-
} while (
|
910
|
+
returnValue += string.slice(endIndex, index6) + substring + replacer;
|
911
|
+
endIndex = index6 + substringLength;
|
912
|
+
index6 = string.indexOf(substring, endIndex);
|
913
|
+
} while (index6 !== -1);
|
914
914
|
returnValue += string.slice(endIndex);
|
915
915
|
return returnValue;
|
916
916
|
}
|
917
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix,
|
917
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index6) {
|
918
918
|
let endIndex = 0;
|
919
919
|
let returnValue = "";
|
920
920
|
do {
|
921
|
-
const gotCR = string[
|
922
|
-
returnValue += string.slice(endIndex, gotCR ?
|
923
|
-
endIndex =
|
924
|
-
|
925
|
-
} while (
|
921
|
+
const gotCR = string[index6 - 1] === "\r";
|
922
|
+
returnValue += string.slice(endIndex, gotCR ? index6 - 1 : index6) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
923
|
+
endIndex = index6 + 1;
|
924
|
+
index6 = string.indexOf("\n", endIndex);
|
925
|
+
} while (index6 !== -1);
|
926
926
|
returnValue += string.slice(endIndex);
|
927
927
|
return returnValue;
|
928
928
|
}
|
@@ -3449,10 +3449,10 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
3449
3449
|
// }) as any;
|
3450
3450
|
// return merged;
|
3451
3451
|
// }
|
3452
|
-
catchall(
|
3452
|
+
catchall(index6) {
|
3453
3453
|
return new _ZodObject({
|
3454
3454
|
...this._def,
|
3455
|
-
catchall:
|
3455
|
+
catchall: index6
|
3456
3456
|
});
|
3457
3457
|
}
|
3458
3458
|
pick(mask) {
|
@@ -3770,9 +3770,9 @@ function mergeValues(a, b) {
|
|
3770
3770
|
return { valid: false };
|
3771
3771
|
}
|
3772
3772
|
const newArray = [];
|
3773
|
-
for (let
|
3774
|
-
const itemA = a[
|
3775
|
-
const itemB = b[
|
3773
|
+
for (let index6 = 0; index6 < a.length; index6++) {
|
3774
|
+
const itemA = a[index6];
|
3775
|
+
const itemB = b[index6];
|
3776
3776
|
const sharedValue = mergeValues(itemA, itemB);
|
3777
3777
|
if (!sharedValue.valid) {
|
3778
3778
|
return { valid: false };
|
@@ -3978,10 +3978,10 @@ var ZodMap = class extends ZodType {
|
|
3978
3978
|
}
|
3979
3979
|
const keyType = this._def.keyType;
|
3980
3980
|
const valueType = this._def.valueType;
|
3981
|
-
const pairs = [...ctx.data.entries()].map(([key, value],
|
3981
|
+
const pairs = [...ctx.data.entries()].map(([key, value], index6) => {
|
3982
3982
|
return {
|
3983
|
-
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [
|
3984
|
-
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [
|
3983
|
+
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index6, "key"])),
|
3984
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index6, "value"]))
|
3985
3985
|
};
|
3986
3986
|
});
|
3987
3987
|
if (ctx.common.async) {
|
@@ -4858,8 +4858,266 @@ var nullableType = ZodNullable.create;
|
|
4858
4858
|
var preprocessType = ZodEffects.createWithPreprocess;
|
4859
4859
|
var pipelineType = ZodPipeline.create;
|
4860
4860
|
|
4861
|
-
// src/serializer/
|
4861
|
+
// src/serializer/gelSchema.ts
|
4862
|
+
var enumSchema = objectType({
|
4863
|
+
name: stringType(),
|
4864
|
+
schema: stringType(),
|
4865
|
+
values: stringType().array()
|
4866
|
+
}).strict();
|
4867
|
+
var enumSchemaV1 = objectType({
|
4868
|
+
name: stringType(),
|
4869
|
+
values: recordType(stringType(), stringType())
|
4870
|
+
}).strict();
|
4871
|
+
var indexColumn = objectType({
|
4872
|
+
expression: stringType(),
|
4873
|
+
isExpression: booleanType(),
|
4874
|
+
asc: booleanType(),
|
4875
|
+
nulls: stringType().optional(),
|
4876
|
+
opclass: stringType().optional()
|
4877
|
+
});
|
4862
4878
|
var index = objectType({
|
4879
|
+
name: stringType(),
|
4880
|
+
columns: indexColumn.array(),
|
4881
|
+
isUnique: booleanType(),
|
4882
|
+
with: recordType(stringType(), anyType()).optional(),
|
4883
|
+
method: stringType().default("btree"),
|
4884
|
+
where: stringType().optional(),
|
4885
|
+
concurrently: booleanType().default(false)
|
4886
|
+
}).strict();
|
4887
|
+
var fk = objectType({
|
4888
|
+
name: stringType(),
|
4889
|
+
tableFrom: stringType(),
|
4890
|
+
columnsFrom: stringType().array(),
|
4891
|
+
tableTo: stringType(),
|
4892
|
+
schemaTo: stringType().optional(),
|
4893
|
+
columnsTo: stringType().array(),
|
4894
|
+
onUpdate: stringType().optional(),
|
4895
|
+
onDelete: stringType().optional()
|
4896
|
+
}).strict();
|
4897
|
+
var sequenceSchema = objectType({
|
4898
|
+
name: stringType(),
|
4899
|
+
increment: stringType().optional(),
|
4900
|
+
minValue: stringType().optional(),
|
4901
|
+
maxValue: stringType().optional(),
|
4902
|
+
startWith: stringType().optional(),
|
4903
|
+
cache: stringType().optional(),
|
4904
|
+
cycle: booleanType().optional(),
|
4905
|
+
schema: stringType()
|
4906
|
+
}).strict();
|
4907
|
+
var roleSchema = objectType({
|
4908
|
+
name: stringType(),
|
4909
|
+
createDb: booleanType().optional(),
|
4910
|
+
createRole: booleanType().optional(),
|
4911
|
+
inherit: booleanType().optional()
|
4912
|
+
}).strict();
|
4913
|
+
var sequenceSquashed = objectType({
|
4914
|
+
name: stringType(),
|
4915
|
+
schema: stringType(),
|
4916
|
+
values: stringType()
|
4917
|
+
}).strict();
|
4918
|
+
var column = objectType({
|
4919
|
+
name: stringType(),
|
4920
|
+
type: stringType(),
|
4921
|
+
typeSchema: stringType().optional(),
|
4922
|
+
primaryKey: booleanType(),
|
4923
|
+
notNull: booleanType(),
|
4924
|
+
default: anyType().optional(),
|
4925
|
+
isUnique: anyType().optional(),
|
4926
|
+
uniqueName: stringType().optional(),
|
4927
|
+
nullsNotDistinct: booleanType().optional(),
|
4928
|
+
generated: objectType({
|
4929
|
+
type: literalType("stored"),
|
4930
|
+
as: stringType()
|
4931
|
+
}).optional(),
|
4932
|
+
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
4933
|
+
}).strict();
|
4934
|
+
var checkConstraint = objectType({
|
4935
|
+
name: stringType(),
|
4936
|
+
value: stringType()
|
4937
|
+
}).strict();
|
4938
|
+
var columnSquashed = objectType({
|
4939
|
+
name: stringType(),
|
4940
|
+
type: stringType(),
|
4941
|
+
typeSchema: stringType().optional(),
|
4942
|
+
primaryKey: booleanType(),
|
4943
|
+
notNull: booleanType(),
|
4944
|
+
default: anyType().optional(),
|
4945
|
+
isUnique: anyType().optional(),
|
4946
|
+
uniqueName: stringType().optional(),
|
4947
|
+
nullsNotDistinct: booleanType().optional(),
|
4948
|
+
generated: objectType({
|
4949
|
+
type: literalType("stored"),
|
4950
|
+
as: stringType()
|
4951
|
+
}).optional(),
|
4952
|
+
identity: stringType().optional()
|
4953
|
+
}).strict();
|
4954
|
+
var compositePK = objectType({
|
4955
|
+
name: stringType(),
|
4956
|
+
columns: stringType().array()
|
4957
|
+
}).strict();
|
4958
|
+
var uniqueConstraint = objectType({
|
4959
|
+
name: stringType(),
|
4960
|
+
columns: stringType().array(),
|
4961
|
+
nullsNotDistinct: booleanType()
|
4962
|
+
}).strict();
|
4963
|
+
var policy = objectType({
|
4964
|
+
name: stringType(),
|
4965
|
+
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
4966
|
+
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
4967
|
+
to: stringType().array().optional(),
|
4968
|
+
using: stringType().optional(),
|
4969
|
+
withCheck: stringType().optional(),
|
4970
|
+
on: stringType().optional(),
|
4971
|
+
schema: stringType().optional()
|
4972
|
+
}).strict();
|
4973
|
+
var policySquashed = objectType({
|
4974
|
+
name: stringType(),
|
4975
|
+
values: stringType()
|
4976
|
+
}).strict();
|
4977
|
+
var viewWithOption = objectType({
|
4978
|
+
checkOption: enumType(["local", "cascaded"]).optional(),
|
4979
|
+
securityBarrier: booleanType().optional(),
|
4980
|
+
securityInvoker: booleanType().optional()
|
4981
|
+
}).strict();
|
4982
|
+
var matViewWithOption = objectType({
|
4983
|
+
fillfactor: numberType().optional(),
|
4984
|
+
toastTupleTarget: numberType().optional(),
|
4985
|
+
parallelWorkers: numberType().optional(),
|
4986
|
+
autovacuumEnabled: booleanType().optional(),
|
4987
|
+
vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
|
4988
|
+
vacuumTruncate: booleanType().optional(),
|
4989
|
+
autovacuumVacuumThreshold: numberType().optional(),
|
4990
|
+
autovacuumVacuumScaleFactor: numberType().optional(),
|
4991
|
+
autovacuumVacuumCostDelay: numberType().optional(),
|
4992
|
+
autovacuumVacuumCostLimit: numberType().optional(),
|
4993
|
+
autovacuumFreezeMinAge: numberType().optional(),
|
4994
|
+
autovacuumFreezeMaxAge: numberType().optional(),
|
4995
|
+
autovacuumFreezeTableAge: numberType().optional(),
|
4996
|
+
autovacuumMultixactFreezeMinAge: numberType().optional(),
|
4997
|
+
autovacuumMultixactFreezeMaxAge: numberType().optional(),
|
4998
|
+
autovacuumMultixactFreezeTableAge: numberType().optional(),
|
4999
|
+
logAutovacuumMinDuration: numberType().optional(),
|
5000
|
+
userCatalogTable: booleanType().optional()
|
5001
|
+
}).strict();
|
5002
|
+
var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
|
5003
|
+
var view = objectType({
|
5004
|
+
name: stringType(),
|
5005
|
+
schema: stringType(),
|
5006
|
+
columns: recordType(stringType(), column),
|
5007
|
+
definition: stringType().optional(),
|
5008
|
+
materialized: booleanType(),
|
5009
|
+
with: mergedViewWithOption.optional(),
|
5010
|
+
isExisting: booleanType(),
|
5011
|
+
withNoData: booleanType().optional(),
|
5012
|
+
using: stringType().optional(),
|
5013
|
+
tablespace: stringType().optional()
|
5014
|
+
}).strict();
|
5015
|
+
var table = objectType({
|
5016
|
+
name: stringType(),
|
5017
|
+
schema: stringType(),
|
5018
|
+
columns: recordType(stringType(), column),
|
5019
|
+
indexes: recordType(stringType(), index),
|
5020
|
+
foreignKeys: recordType(stringType(), fk),
|
5021
|
+
compositePrimaryKeys: recordType(stringType(), compositePK),
|
5022
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
|
5023
|
+
policies: recordType(stringType(), policy).default({}),
|
5024
|
+
checkConstraints: recordType(stringType(), checkConstraint).default({}),
|
5025
|
+
isRLSEnabled: booleanType().default(false)
|
5026
|
+
}).strict();
|
5027
|
+
var schemaHash = objectType({
|
5028
|
+
id: stringType(),
|
5029
|
+
prevId: stringType()
|
5030
|
+
});
|
5031
|
+
var kitInternals = objectType({
|
5032
|
+
tables: recordType(
|
5033
|
+
stringType(),
|
5034
|
+
objectType({
|
5035
|
+
columns: recordType(
|
5036
|
+
stringType(),
|
5037
|
+
objectType({
|
5038
|
+
isArray: booleanType().optional(),
|
5039
|
+
dimensions: numberType().optional(),
|
5040
|
+
rawType: stringType().optional(),
|
5041
|
+
isDefaultAnExpression: booleanType().optional()
|
5042
|
+
}).optional()
|
5043
|
+
)
|
5044
|
+
}).optional()
|
5045
|
+
)
|
5046
|
+
}).optional();
|
5047
|
+
var gelSchemaExternal = objectType({
|
5048
|
+
version: literalType("1"),
|
5049
|
+
dialect: literalType("gel"),
|
5050
|
+
tables: arrayType(table),
|
5051
|
+
enums: arrayType(enumSchemaV1),
|
5052
|
+
schemas: arrayType(objectType({ name: stringType() })),
|
5053
|
+
_meta: objectType({
|
5054
|
+
schemas: recordType(stringType(), stringType()),
|
5055
|
+
tables: recordType(stringType(), stringType()),
|
5056
|
+
columns: recordType(stringType(), stringType())
|
5057
|
+
})
|
5058
|
+
}).strict();
|
5059
|
+
var gelSchemaInternal = objectType({
|
5060
|
+
version: literalType("1"),
|
5061
|
+
dialect: literalType("gel"),
|
5062
|
+
tables: recordType(stringType(), table),
|
5063
|
+
enums: recordType(stringType(), enumSchema),
|
5064
|
+
schemas: recordType(stringType(), stringType()),
|
5065
|
+
views: recordType(stringType(), view).default({}),
|
5066
|
+
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5067
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5068
|
+
policies: recordType(stringType(), policy).default({}),
|
5069
|
+
_meta: objectType({
|
5070
|
+
schemas: recordType(stringType(), stringType()),
|
5071
|
+
tables: recordType(stringType(), stringType()),
|
5072
|
+
columns: recordType(stringType(), stringType())
|
5073
|
+
}),
|
5074
|
+
internal: kitInternals
|
5075
|
+
}).strict();
|
5076
|
+
var tableSquashed = objectType({
|
5077
|
+
name: stringType(),
|
5078
|
+
schema: stringType(),
|
5079
|
+
columns: recordType(stringType(), columnSquashed),
|
5080
|
+
indexes: recordType(stringType(), stringType()),
|
5081
|
+
foreignKeys: recordType(stringType(), stringType()),
|
5082
|
+
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5083
|
+
uniqueConstraints: recordType(stringType(), stringType()),
|
5084
|
+
policies: recordType(stringType(), stringType()),
|
5085
|
+
checkConstraints: recordType(stringType(), stringType()),
|
5086
|
+
isRLSEnabled: booleanType().default(false)
|
5087
|
+
}).strict();
|
5088
|
+
var gelSchemaSquashed = objectType({
|
5089
|
+
version: literalType("1"),
|
5090
|
+
dialect: literalType("gel"),
|
5091
|
+
tables: recordType(stringType(), tableSquashed),
|
5092
|
+
enums: recordType(stringType(), enumSchema),
|
5093
|
+
schemas: recordType(stringType(), stringType()),
|
5094
|
+
views: recordType(stringType(), view),
|
5095
|
+
sequences: recordType(stringType(), sequenceSquashed),
|
5096
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5097
|
+
policies: recordType(stringType(), policySquashed).default({})
|
5098
|
+
}).strict();
|
5099
|
+
var gelSchema = gelSchemaInternal.merge(schemaHash);
|
5100
|
+
var backwardCompatibleGelSchema = gelSchema;
|
5101
|
+
var dryGel = gelSchema.parse({
|
5102
|
+
version: "1",
|
5103
|
+
dialect: "gel",
|
5104
|
+
id: originUUID,
|
5105
|
+
prevId: "",
|
5106
|
+
tables: {},
|
5107
|
+
enums: {},
|
5108
|
+
schemas: {},
|
5109
|
+
policies: {},
|
5110
|
+
roles: {},
|
5111
|
+
sequences: {},
|
5112
|
+
_meta: {
|
5113
|
+
schemas: {},
|
5114
|
+
tables: {},
|
5115
|
+
columns: {}
|
5116
|
+
}
|
5117
|
+
});
|
5118
|
+
|
5119
|
+
// src/serializer/mysqlSchema.ts
|
5120
|
+
var index2 = objectType({
|
4863
5121
|
name: stringType(),
|
4864
5122
|
columns: stringType().array(),
|
4865
5123
|
isUnique: booleanType(),
|
@@ -4867,7 +5125,7 @@ var index = objectType({
|
|
4867
5125
|
algorithm: enumType(["default", "inplace", "copy"]).optional(),
|
4868
5126
|
lock: enumType(["default", "none", "shared", "exclusive"]).optional()
|
4869
5127
|
}).strict();
|
4870
|
-
var
|
5128
|
+
var fk2 = objectType({
|
4871
5129
|
name: stringType(),
|
4872
5130
|
tableFrom: stringType(),
|
4873
5131
|
columnsFrom: stringType().array(),
|
@@ -4876,7 +5134,7 @@ var fk = objectType({
|
|
4876
5134
|
onUpdate: stringType().optional(),
|
4877
5135
|
onDelete: stringType().optional()
|
4878
5136
|
}).strict();
|
4879
|
-
var
|
5137
|
+
var column2 = objectType({
|
4880
5138
|
name: stringType(),
|
4881
5139
|
type: stringType(),
|
4882
5140
|
primaryKey: booleanType(),
|
@@ -4891,50 +5149,50 @@ var column = objectType({
|
|
4891
5149
|
}).strict();
|
4892
5150
|
var tableV3 = objectType({
|
4893
5151
|
name: stringType(),
|
4894
|
-
columns: recordType(stringType(),
|
4895
|
-
indexes: recordType(stringType(),
|
4896
|
-
foreignKeys: recordType(stringType(),
|
5152
|
+
columns: recordType(stringType(), column2),
|
5153
|
+
indexes: recordType(stringType(), index2),
|
5154
|
+
foreignKeys: recordType(stringType(), fk2)
|
4897
5155
|
}).strict();
|
4898
|
-
var
|
5156
|
+
var compositePK2 = objectType({
|
4899
5157
|
name: stringType(),
|
4900
5158
|
columns: stringType().array()
|
4901
5159
|
}).strict();
|
4902
|
-
var
|
5160
|
+
var uniqueConstraint2 = objectType({
|
4903
5161
|
name: stringType(),
|
4904
5162
|
columns: stringType().array()
|
4905
5163
|
}).strict();
|
4906
|
-
var
|
5164
|
+
var checkConstraint2 = objectType({
|
4907
5165
|
name: stringType(),
|
4908
5166
|
value: stringType()
|
4909
5167
|
}).strict();
|
4910
5168
|
var tableV4 = objectType({
|
4911
5169
|
name: stringType(),
|
4912
5170
|
schema: stringType().optional(),
|
4913
|
-
columns: recordType(stringType(),
|
4914
|
-
indexes: recordType(stringType(),
|
4915
|
-
foreignKeys: recordType(stringType(),
|
5171
|
+
columns: recordType(stringType(), column2),
|
5172
|
+
indexes: recordType(stringType(), index2),
|
5173
|
+
foreignKeys: recordType(stringType(), fk2)
|
4916
5174
|
}).strict();
|
4917
|
-
var
|
5175
|
+
var table2 = objectType({
|
4918
5176
|
name: stringType(),
|
4919
|
-
columns: recordType(stringType(),
|
4920
|
-
indexes: recordType(stringType(),
|
4921
|
-
foreignKeys: recordType(stringType(),
|
4922
|
-
compositePrimaryKeys: recordType(stringType(),
|
4923
|
-
uniqueConstraints: recordType(stringType(),
|
4924
|
-
checkConstraint: recordType(stringType(),
|
5177
|
+
columns: recordType(stringType(), column2),
|
5178
|
+
indexes: recordType(stringType(), index2),
|
5179
|
+
foreignKeys: recordType(stringType(), fk2),
|
5180
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5181
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5182
|
+
checkConstraint: recordType(stringType(), checkConstraint2).default({})
|
4925
5183
|
}).strict();
|
4926
5184
|
var viewMeta = objectType({
|
4927
5185
|
algorithm: enumType(["undefined", "merge", "temptable"]),
|
4928
5186
|
sqlSecurity: enumType(["definer", "invoker"]),
|
4929
5187
|
withCheckOption: enumType(["local", "cascaded"]).optional()
|
4930
5188
|
}).strict();
|
4931
|
-
var
|
5189
|
+
var view2 = objectType({
|
4932
5190
|
name: stringType(),
|
4933
|
-
columns: recordType(stringType(),
|
5191
|
+
columns: recordType(stringType(), column2),
|
4934
5192
|
definition: stringType().optional(),
|
4935
5193
|
isExisting: booleanType()
|
4936
5194
|
}).strict().merge(viewMeta);
|
4937
|
-
var
|
5195
|
+
var kitInternals2 = objectType({
|
4938
5196
|
tables: recordType(
|
4939
5197
|
stringType(),
|
4940
5198
|
objectType({
|
@@ -4955,7 +5213,7 @@ var kitInternals = objectType({
|
|
4955
5213
|
).optional()
|
4956
5214
|
}).optional();
|
4957
5215
|
var dialect = literalType("mysql");
|
4958
|
-
var
|
5216
|
+
var schemaHash2 = objectType({
|
4959
5217
|
id: stringType(),
|
4960
5218
|
prevId: stringType()
|
4961
5219
|
});
|
@@ -4973,47 +5231,47 @@ var schemaInternalV4 = objectType({
|
|
4973
5231
|
var schemaInternalV5 = objectType({
|
4974
5232
|
version: literalType("5"),
|
4975
5233
|
dialect,
|
4976
|
-
tables: recordType(stringType(),
|
5234
|
+
tables: recordType(stringType(), table2),
|
4977
5235
|
schemas: recordType(stringType(), stringType()),
|
4978
5236
|
_meta: objectType({
|
4979
5237
|
schemas: recordType(stringType(), stringType()),
|
4980
5238
|
tables: recordType(stringType(), stringType()),
|
4981
5239
|
columns: recordType(stringType(), stringType())
|
4982
5240
|
}),
|
4983
|
-
internal:
|
5241
|
+
internal: kitInternals2
|
4984
5242
|
}).strict();
|
4985
5243
|
var schemaInternal = objectType({
|
4986
5244
|
version: literalType("5"),
|
4987
5245
|
dialect,
|
4988
|
-
tables: recordType(stringType(),
|
4989
|
-
views: recordType(stringType(),
|
5246
|
+
tables: recordType(stringType(), table2),
|
5247
|
+
views: recordType(stringType(), view2).default({}),
|
4990
5248
|
_meta: objectType({
|
4991
5249
|
tables: recordType(stringType(), stringType()),
|
4992
5250
|
columns: recordType(stringType(), stringType())
|
4993
5251
|
}),
|
4994
|
-
internal:
|
5252
|
+
internal: kitInternals2
|
4995
5253
|
}).strict();
|
4996
|
-
var schemaV3 = schemaInternalV3.merge(
|
4997
|
-
var schemaV4 = schemaInternalV4.merge(
|
4998
|
-
var schemaV5 = schemaInternalV5.merge(
|
4999
|
-
var schema = schemaInternal.merge(
|
5254
|
+
var schemaV3 = schemaInternalV3.merge(schemaHash2);
|
5255
|
+
var schemaV4 = schemaInternalV4.merge(schemaHash2);
|
5256
|
+
var schemaV5 = schemaInternalV5.merge(schemaHash2);
|
5257
|
+
var schema = schemaInternal.merge(schemaHash2);
|
5000
5258
|
var tableSquashedV4 = objectType({
|
5001
5259
|
name: stringType(),
|
5002
5260
|
schema: stringType().optional(),
|
5003
|
-
columns: recordType(stringType(),
|
5261
|
+
columns: recordType(stringType(), column2),
|
5004
5262
|
indexes: recordType(stringType(), stringType()),
|
5005
5263
|
foreignKeys: recordType(stringType(), stringType())
|
5006
5264
|
}).strict();
|
5007
|
-
var
|
5265
|
+
var tableSquashed2 = objectType({
|
5008
5266
|
name: stringType(),
|
5009
|
-
columns: recordType(stringType(),
|
5267
|
+
columns: recordType(stringType(), column2),
|
5010
5268
|
indexes: recordType(stringType(), stringType()),
|
5011
5269
|
foreignKeys: recordType(stringType(), stringType()),
|
5012
5270
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5013
5271
|
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
5014
5272
|
checkConstraints: recordType(stringType(), stringType()).default({})
|
5015
5273
|
}).strict();
|
5016
|
-
var viewSquashed =
|
5274
|
+
var viewSquashed = view2.omit({
|
5017
5275
|
algorithm: true,
|
5018
5276
|
sqlSecurity: true,
|
5019
5277
|
withCheckOption: true
|
@@ -5021,7 +5279,7 @@ var viewSquashed = view.omit({
|
|
5021
5279
|
var schemaSquashed = objectType({
|
5022
5280
|
version: literalType("5"),
|
5023
5281
|
dialect,
|
5024
|
-
tables: recordType(stringType(),
|
5282
|
+
tables: recordType(stringType(), tableSquashed2),
|
5025
5283
|
views: recordType(stringType(), viewSquashed)
|
5026
5284
|
}).strict();
|
5027
5285
|
var schemaSquashedV4 = objectType({
|
@@ -5072,11 +5330,11 @@ var tableV2 = objectType({
|
|
5072
5330
|
columns: recordType(stringType(), columnV2),
|
5073
5331
|
indexes: recordType(stringType(), indexV2)
|
5074
5332
|
}).strict();
|
5075
|
-
var
|
5333
|
+
var enumSchemaV12 = objectType({
|
5076
5334
|
name: stringType(),
|
5077
5335
|
values: recordType(stringType(), stringType())
|
5078
5336
|
}).strict();
|
5079
|
-
var
|
5337
|
+
var enumSchema2 = objectType({
|
5080
5338
|
name: stringType(),
|
5081
5339
|
schema: stringType(),
|
5082
5340
|
values: stringType().array()
|
@@ -5084,7 +5342,7 @@ var enumSchema = objectType({
|
|
5084
5342
|
var pgSchemaV2 = objectType({
|
5085
5343
|
version: literalType("2"),
|
5086
5344
|
tables: recordType(stringType(), tableV2),
|
5087
|
-
enums: recordType(stringType(),
|
5345
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5088
5346
|
}).strict();
|
5089
5347
|
var references = objectType({
|
5090
5348
|
foreignKeyName: stringType(),
|
@@ -5109,18 +5367,18 @@ var tableV1 = objectType({
|
|
5109
5367
|
var pgSchemaV1 = objectType({
|
5110
5368
|
version: literalType("1"),
|
5111
5369
|
tables: recordType(stringType(), tableV1),
|
5112
|
-
enums: recordType(stringType(),
|
5370
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5113
5371
|
}).strict();
|
5114
|
-
var
|
5372
|
+
var indexColumn2 = objectType({
|
5115
5373
|
expression: stringType(),
|
5116
5374
|
isExpression: booleanType(),
|
5117
5375
|
asc: booleanType(),
|
5118
5376
|
nulls: stringType().optional(),
|
5119
5377
|
opclass: stringType().optional()
|
5120
5378
|
});
|
5121
|
-
var
|
5379
|
+
var index3 = objectType({
|
5122
5380
|
name: stringType(),
|
5123
|
-
columns:
|
5381
|
+
columns: indexColumn2.array(),
|
5124
5382
|
isUnique: booleanType(),
|
5125
5383
|
with: recordType(stringType(), anyType()).optional(),
|
5126
5384
|
method: stringType().default("btree"),
|
@@ -5154,7 +5412,7 @@ var indexV6 = objectType({
|
|
5154
5412
|
where: stringType().optional(),
|
5155
5413
|
concurrently: booleanType().default(false)
|
5156
5414
|
}).strict();
|
5157
|
-
var
|
5415
|
+
var fk3 = objectType({
|
5158
5416
|
name: stringType(),
|
5159
5417
|
tableFrom: stringType(),
|
5160
5418
|
columnsFrom: stringType().array(),
|
@@ -5164,7 +5422,7 @@ var fk2 = objectType({
|
|
5164
5422
|
onUpdate: stringType().optional(),
|
5165
5423
|
onDelete: stringType().optional()
|
5166
5424
|
}).strict();
|
5167
|
-
var
|
5425
|
+
var sequenceSchema2 = objectType({
|
5168
5426
|
name: stringType(),
|
5169
5427
|
increment: stringType().optional(),
|
5170
5428
|
minValue: stringType().optional(),
|
@@ -5174,13 +5432,13 @@ var sequenceSchema = objectType({
|
|
5174
5432
|
cycle: booleanType().optional(),
|
5175
5433
|
schema: stringType()
|
5176
5434
|
}).strict();
|
5177
|
-
var
|
5435
|
+
var roleSchema2 = objectType({
|
5178
5436
|
name: stringType(),
|
5179
5437
|
createDb: booleanType().optional(),
|
5180
5438
|
createRole: booleanType().optional(),
|
5181
5439
|
inherit: booleanType().optional()
|
5182
5440
|
}).strict();
|
5183
|
-
var
|
5441
|
+
var sequenceSquashed2 = objectType({
|
5184
5442
|
name: stringType(),
|
5185
5443
|
schema: stringType(),
|
5186
5444
|
values: stringType()
|
@@ -5196,7 +5454,7 @@ var columnV7 = objectType({
|
|
5196
5454
|
uniqueName: stringType().optional(),
|
5197
5455
|
nullsNotDistinct: booleanType().optional()
|
5198
5456
|
}).strict();
|
5199
|
-
var
|
5457
|
+
var column3 = objectType({
|
5200
5458
|
name: stringType(),
|
5201
5459
|
type: stringType(),
|
5202
5460
|
typeSchema: stringType().optional(),
|
@@ -5210,13 +5468,13 @@ var column2 = objectType({
|
|
5210
5468
|
type: literalType("stored"),
|
5211
5469
|
as: stringType()
|
5212
5470
|
}).optional(),
|
5213
|
-
identity:
|
5471
|
+
identity: sequenceSchema2.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5214
5472
|
}).strict();
|
5215
|
-
var
|
5473
|
+
var checkConstraint3 = objectType({
|
5216
5474
|
name: stringType(),
|
5217
5475
|
value: stringType()
|
5218
5476
|
}).strict();
|
5219
|
-
var
|
5477
|
+
var columnSquashed2 = objectType({
|
5220
5478
|
name: stringType(),
|
5221
5479
|
type: stringType(),
|
5222
5480
|
typeSchema: stringType().optional(),
|
@@ -5234,20 +5492,20 @@ var columnSquashed = objectType({
|
|
5234
5492
|
}).strict();
|
5235
5493
|
var tableV32 = objectType({
|
5236
5494
|
name: stringType(),
|
5237
|
-
columns: recordType(stringType(),
|
5238
|
-
indexes: recordType(stringType(),
|
5239
|
-
foreignKeys: recordType(stringType(),
|
5495
|
+
columns: recordType(stringType(), column3),
|
5496
|
+
indexes: recordType(stringType(), index3),
|
5497
|
+
foreignKeys: recordType(stringType(), fk3)
|
5240
5498
|
}).strict();
|
5241
|
-
var
|
5499
|
+
var compositePK3 = objectType({
|
5242
5500
|
name: stringType(),
|
5243
5501
|
columns: stringType().array()
|
5244
5502
|
}).strict();
|
5245
|
-
var
|
5503
|
+
var uniqueConstraint3 = objectType({
|
5246
5504
|
name: stringType(),
|
5247
5505
|
columns: stringType().array(),
|
5248
5506
|
nullsNotDistinct: booleanType()
|
5249
5507
|
}).strict();
|
5250
|
-
var
|
5508
|
+
var policy2 = objectType({
|
5251
5509
|
name: stringType(),
|
5252
5510
|
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
5253
5511
|
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
@@ -5257,16 +5515,16 @@ var policy = objectType({
|
|
5257
5515
|
on: stringType().optional(),
|
5258
5516
|
schema: stringType().optional()
|
5259
5517
|
}).strict();
|
5260
|
-
var
|
5518
|
+
var policySquashed2 = objectType({
|
5261
5519
|
name: stringType(),
|
5262
5520
|
values: stringType()
|
5263
5521
|
}).strict();
|
5264
|
-
var
|
5522
|
+
var viewWithOption2 = objectType({
|
5265
5523
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
5266
5524
|
securityBarrier: booleanType().optional(),
|
5267
5525
|
securityInvoker: booleanType().optional()
|
5268
5526
|
}).strict();
|
5269
|
-
var
|
5527
|
+
var matViewWithOption2 = objectType({
|
5270
5528
|
fillfactor: numberType().optional(),
|
5271
5529
|
toastTupleTarget: numberType().optional(),
|
5272
5530
|
parallelWorkers: numberType().optional(),
|
@@ -5286,14 +5544,14 @@ var matViewWithOption = objectType({
|
|
5286
5544
|
logAutovacuumMinDuration: numberType().optional(),
|
5287
5545
|
userCatalogTable: booleanType().optional()
|
5288
5546
|
}).strict();
|
5289
|
-
var
|
5290
|
-
var
|
5547
|
+
var mergedViewWithOption2 = viewWithOption2.merge(matViewWithOption2).strict();
|
5548
|
+
var view3 = objectType({
|
5291
5549
|
name: stringType(),
|
5292
5550
|
schema: stringType(),
|
5293
|
-
columns: recordType(stringType(),
|
5551
|
+
columns: recordType(stringType(), column3),
|
5294
5552
|
definition: stringType().optional(),
|
5295
5553
|
materialized: booleanType(),
|
5296
|
-
with:
|
5554
|
+
with: mergedViewWithOption2.optional(),
|
5297
5555
|
isExisting: booleanType(),
|
5298
5556
|
withNoData: booleanType().optional(),
|
5299
5557
|
using: stringType().optional(),
|
@@ -5302,54 +5560,54 @@ var view2 = objectType({
|
|
5302
5560
|
var tableV42 = objectType({
|
5303
5561
|
name: stringType(),
|
5304
5562
|
schema: stringType(),
|
5305
|
-
columns: recordType(stringType(),
|
5563
|
+
columns: recordType(stringType(), column3),
|
5306
5564
|
indexes: recordType(stringType(), indexV4),
|
5307
|
-
foreignKeys: recordType(stringType(),
|
5565
|
+
foreignKeys: recordType(stringType(), fk3)
|
5308
5566
|
}).strict();
|
5309
5567
|
var tableV5 = objectType({
|
5310
5568
|
name: stringType(),
|
5311
5569
|
schema: stringType(),
|
5312
|
-
columns: recordType(stringType(),
|
5570
|
+
columns: recordType(stringType(), column3),
|
5313
5571
|
indexes: recordType(stringType(), indexV5),
|
5314
|
-
foreignKeys: recordType(stringType(),
|
5315
|
-
compositePrimaryKeys: recordType(stringType(),
|
5316
|
-
uniqueConstraints: recordType(stringType(),
|
5572
|
+
foreignKeys: recordType(stringType(), fk3),
|
5573
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5574
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5317
5575
|
}).strict();
|
5318
5576
|
var tableV6 = objectType({
|
5319
5577
|
name: stringType(),
|
5320
5578
|
schema: stringType(),
|
5321
|
-
columns: recordType(stringType(),
|
5579
|
+
columns: recordType(stringType(), column3),
|
5322
5580
|
indexes: recordType(stringType(), indexV6),
|
5323
|
-
foreignKeys: recordType(stringType(),
|
5324
|
-
compositePrimaryKeys: recordType(stringType(),
|
5325
|
-
uniqueConstraints: recordType(stringType(),
|
5581
|
+
foreignKeys: recordType(stringType(), fk3),
|
5582
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5583
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5326
5584
|
}).strict();
|
5327
5585
|
var tableV7 = objectType({
|
5328
5586
|
name: stringType(),
|
5329
5587
|
schema: stringType(),
|
5330
5588
|
columns: recordType(stringType(), columnV7),
|
5331
|
-
indexes: recordType(stringType(),
|
5332
|
-
foreignKeys: recordType(stringType(),
|
5333
|
-
compositePrimaryKeys: recordType(stringType(),
|
5334
|
-
uniqueConstraints: recordType(stringType(),
|
5589
|
+
indexes: recordType(stringType(), index3),
|
5590
|
+
foreignKeys: recordType(stringType(), fk3),
|
5591
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5592
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5335
5593
|
}).strict();
|
5336
|
-
var
|
5594
|
+
var table3 = objectType({
|
5337
5595
|
name: stringType(),
|
5338
5596
|
schema: stringType(),
|
5339
|
-
columns: recordType(stringType(),
|
5340
|
-
indexes: recordType(stringType(),
|
5341
|
-
foreignKeys: recordType(stringType(),
|
5342
|
-
compositePrimaryKeys: recordType(stringType(),
|
5343
|
-
uniqueConstraints: recordType(stringType(),
|
5344
|
-
policies: recordType(stringType(),
|
5345
|
-
checkConstraints: recordType(stringType(),
|
5597
|
+
columns: recordType(stringType(), column3),
|
5598
|
+
indexes: recordType(stringType(), index3),
|
5599
|
+
foreignKeys: recordType(stringType(), fk3),
|
5600
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5601
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
|
5602
|
+
policies: recordType(stringType(), policy2).default({}),
|
5603
|
+
checkConstraints: recordType(stringType(), checkConstraint3).default({}),
|
5346
5604
|
isRLSEnabled: booleanType().default(false)
|
5347
5605
|
}).strict();
|
5348
|
-
var
|
5606
|
+
var schemaHash3 = objectType({
|
5349
5607
|
id: stringType(),
|
5350
5608
|
prevId: stringType()
|
5351
5609
|
});
|
5352
|
-
var
|
5610
|
+
var kitInternals3 = objectType({
|
5353
5611
|
tables: recordType(
|
5354
5612
|
stringType(),
|
5355
5613
|
objectType({
|
@@ -5369,46 +5627,46 @@ var pgSchemaInternalV3 = objectType({
|
|
5369
5627
|
version: literalType("3"),
|
5370
5628
|
dialect: literalType("pg"),
|
5371
5629
|
tables: recordType(stringType(), tableV32),
|
5372
|
-
enums: recordType(stringType(),
|
5630
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5373
5631
|
}).strict();
|
5374
5632
|
var pgSchemaInternalV4 = objectType({
|
5375
5633
|
version: literalType("4"),
|
5376
5634
|
dialect: literalType("pg"),
|
5377
5635
|
tables: recordType(stringType(), tableV42),
|
5378
|
-
enums: recordType(stringType(),
|
5636
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5379
5637
|
schemas: recordType(stringType(), stringType())
|
5380
5638
|
}).strict();
|
5381
5639
|
var pgSchemaInternalV5 = objectType({
|
5382
5640
|
version: literalType("5"),
|
5383
5641
|
dialect: literalType("pg"),
|
5384
5642
|
tables: recordType(stringType(), tableV5),
|
5385
|
-
enums: recordType(stringType(),
|
5643
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5386
5644
|
schemas: recordType(stringType(), stringType()),
|
5387
5645
|
_meta: objectType({
|
5388
5646
|
schemas: recordType(stringType(), stringType()),
|
5389
5647
|
tables: recordType(stringType(), stringType()),
|
5390
5648
|
columns: recordType(stringType(), stringType())
|
5391
5649
|
}),
|
5392
|
-
internal:
|
5650
|
+
internal: kitInternals3
|
5393
5651
|
}).strict();
|
5394
5652
|
var pgSchemaInternalV6 = objectType({
|
5395
5653
|
version: literalType("6"),
|
5396
5654
|
dialect: literalType("postgresql"),
|
5397
5655
|
tables: recordType(stringType(), tableV6),
|
5398
|
-
enums: recordType(stringType(),
|
5656
|
+
enums: recordType(stringType(), enumSchema2),
|
5399
5657
|
schemas: recordType(stringType(), stringType()),
|
5400
5658
|
_meta: objectType({
|
5401
5659
|
schemas: recordType(stringType(), stringType()),
|
5402
5660
|
tables: recordType(stringType(), stringType()),
|
5403
5661
|
columns: recordType(stringType(), stringType())
|
5404
5662
|
}),
|
5405
|
-
internal:
|
5663
|
+
internal: kitInternals3
|
5406
5664
|
}).strict();
|
5407
5665
|
var pgSchemaExternal = objectType({
|
5408
5666
|
version: literalType("5"),
|
5409
5667
|
dialect: literalType("pg"),
|
5410
|
-
tables: arrayType(
|
5411
|
-
enums: arrayType(
|
5668
|
+
tables: arrayType(table3),
|
5669
|
+
enums: arrayType(enumSchemaV12),
|
5412
5670
|
schemas: arrayType(objectType({ name: stringType() })),
|
5413
5671
|
_meta: objectType({
|
5414
5672
|
schemas: recordType(stringType(), stringType()),
|
@@ -5420,37 +5678,37 @@ var pgSchemaInternalV7 = objectType({
|
|
5420
5678
|
version: literalType("7"),
|
5421
5679
|
dialect: literalType("postgresql"),
|
5422
5680
|
tables: recordType(stringType(), tableV7),
|
5423
|
-
enums: recordType(stringType(),
|
5681
|
+
enums: recordType(stringType(), enumSchema2),
|
5424
5682
|
schemas: recordType(stringType(), stringType()),
|
5425
|
-
sequences: recordType(stringType(),
|
5683
|
+
sequences: recordType(stringType(), sequenceSchema2),
|
5426
5684
|
_meta: objectType({
|
5427
5685
|
schemas: recordType(stringType(), stringType()),
|
5428
5686
|
tables: recordType(stringType(), stringType()),
|
5429
5687
|
columns: recordType(stringType(), stringType())
|
5430
5688
|
}),
|
5431
|
-
internal:
|
5689
|
+
internal: kitInternals3
|
5432
5690
|
}).strict();
|
5433
5691
|
var pgSchemaInternal = objectType({
|
5434
5692
|
version: literalType("7"),
|
5435
5693
|
dialect: literalType("postgresql"),
|
5436
|
-
tables: recordType(stringType(),
|
5437
|
-
enums: recordType(stringType(),
|
5694
|
+
tables: recordType(stringType(), table3),
|
5695
|
+
enums: recordType(stringType(), enumSchema2),
|
5438
5696
|
schemas: recordType(stringType(), stringType()),
|
5439
|
-
views: recordType(stringType(),
|
5440
|
-
sequences: recordType(stringType(),
|
5441
|
-
roles: recordType(stringType(),
|
5442
|
-
policies: recordType(stringType(),
|
5697
|
+
views: recordType(stringType(), view3).default({}),
|
5698
|
+
sequences: recordType(stringType(), sequenceSchema2).default({}),
|
5699
|
+
roles: recordType(stringType(), roleSchema2).default({}),
|
5700
|
+
policies: recordType(stringType(), policy2).default({}),
|
5443
5701
|
_meta: objectType({
|
5444
5702
|
schemas: recordType(stringType(), stringType()),
|
5445
5703
|
tables: recordType(stringType(), stringType()),
|
5446
5704
|
columns: recordType(stringType(), stringType())
|
5447
5705
|
}),
|
5448
|
-
internal:
|
5706
|
+
internal: kitInternals3
|
5449
5707
|
}).strict();
|
5450
|
-
var
|
5708
|
+
var tableSquashed3 = objectType({
|
5451
5709
|
name: stringType(),
|
5452
5710
|
schema: stringType(),
|
5453
|
-
columns: recordType(stringType(),
|
5711
|
+
columns: recordType(stringType(), columnSquashed2),
|
5454
5712
|
indexes: recordType(stringType(), stringType()),
|
5455
5713
|
foreignKeys: recordType(stringType(), stringType()),
|
5456
5714
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5462,7 +5720,7 @@ var tableSquashed2 = objectType({
|
|
5462
5720
|
var tableSquashedV42 = objectType({
|
5463
5721
|
name: stringType(),
|
5464
5722
|
schema: stringType(),
|
5465
|
-
columns: recordType(stringType(),
|
5723
|
+
columns: recordType(stringType(), column3),
|
5466
5724
|
indexes: recordType(stringType(), stringType()),
|
5467
5725
|
foreignKeys: recordType(stringType(), stringType())
|
5468
5726
|
}).strict();
|
@@ -5470,33 +5728,33 @@ var pgSchemaSquashedV4 = objectType({
|
|
5470
5728
|
version: literalType("4"),
|
5471
5729
|
dialect: literalType("pg"),
|
5472
5730
|
tables: recordType(stringType(), tableSquashedV42),
|
5473
|
-
enums: recordType(stringType(),
|
5731
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5474
5732
|
schemas: recordType(stringType(), stringType())
|
5475
5733
|
}).strict();
|
5476
5734
|
var pgSchemaSquashedV6 = objectType({
|
5477
5735
|
version: literalType("6"),
|
5478
5736
|
dialect: literalType("postgresql"),
|
5479
|
-
tables: recordType(stringType(),
|
5480
|
-
enums: recordType(stringType(),
|
5737
|
+
tables: recordType(stringType(), tableSquashed3),
|
5738
|
+
enums: recordType(stringType(), enumSchema2),
|
5481
5739
|
schemas: recordType(stringType(), stringType())
|
5482
5740
|
}).strict();
|
5483
5741
|
var pgSchemaSquashed = objectType({
|
5484
5742
|
version: literalType("7"),
|
5485
5743
|
dialect: literalType("postgresql"),
|
5486
|
-
tables: recordType(stringType(),
|
5487
|
-
enums: recordType(stringType(),
|
5744
|
+
tables: recordType(stringType(), tableSquashed3),
|
5745
|
+
enums: recordType(stringType(), enumSchema2),
|
5488
5746
|
schemas: recordType(stringType(), stringType()),
|
5489
|
-
views: recordType(stringType(),
|
5490
|
-
sequences: recordType(stringType(),
|
5491
|
-
roles: recordType(stringType(),
|
5492
|
-
policies: recordType(stringType(),
|
5747
|
+
views: recordType(stringType(), view3),
|
5748
|
+
sequences: recordType(stringType(), sequenceSquashed2),
|
5749
|
+
roles: recordType(stringType(), roleSchema2).default({}),
|
5750
|
+
policies: recordType(stringType(), policySquashed2).default({})
|
5493
5751
|
}).strict();
|
5494
|
-
var pgSchemaV3 = pgSchemaInternalV3.merge(
|
5495
|
-
var pgSchemaV4 = pgSchemaInternalV4.merge(
|
5496
|
-
var pgSchemaV5 = pgSchemaInternalV5.merge(
|
5497
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(
|
5498
|
-
var pgSchemaV7 = pgSchemaInternalV7.merge(
|
5499
|
-
var pgSchema = pgSchemaInternal.merge(
|
5752
|
+
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash3);
|
5753
|
+
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash3);
|
5754
|
+
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash3);
|
5755
|
+
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash3);
|
5756
|
+
var pgSchemaV7 = pgSchemaInternalV7.merge(schemaHash3);
|
5757
|
+
var pgSchema = pgSchemaInternal.merge(schemaHash3);
|
5500
5758
|
var backwardCompatiblePgSchema = unionType([
|
5501
5759
|
pgSchemaV5,
|
5502
5760
|
pgSchemaV6,
|
@@ -5521,7 +5779,7 @@ var dryPg = pgSchema.parse({
|
|
5521
5779
|
});
|
5522
5780
|
|
5523
5781
|
// src/serializer/singlestoreSchema.ts
|
5524
|
-
var
|
5782
|
+
var index4 = objectType({
|
5525
5783
|
name: stringType(),
|
5526
5784
|
columns: stringType().array(),
|
5527
5785
|
isUnique: booleanType(),
|
@@ -5529,7 +5787,7 @@ var index3 = objectType({
|
|
5529
5787
|
algorithm: enumType(["default", "inplace", "copy"]).optional(),
|
5530
5788
|
lock: enumType(["default", "none", "shared", "exclusive"]).optional()
|
5531
5789
|
}).strict();
|
5532
|
-
var
|
5790
|
+
var column4 = objectType({
|
5533
5791
|
name: stringType(),
|
5534
5792
|
type: stringType(),
|
5535
5793
|
primaryKey: booleanType(),
|
@@ -5542,27 +5800,27 @@ var column3 = objectType({
|
|
5542
5800
|
as: stringType()
|
5543
5801
|
}).optional()
|
5544
5802
|
}).strict();
|
5545
|
-
var
|
5803
|
+
var compositePK4 = objectType({
|
5546
5804
|
name: stringType(),
|
5547
5805
|
columns: stringType().array()
|
5548
5806
|
}).strict();
|
5549
|
-
var
|
5807
|
+
var uniqueConstraint4 = objectType({
|
5550
5808
|
name: stringType(),
|
5551
5809
|
columns: stringType().array()
|
5552
5810
|
}).strict();
|
5553
|
-
var
|
5811
|
+
var table4 = objectType({
|
5554
5812
|
name: stringType(),
|
5555
|
-
columns: recordType(stringType(),
|
5556
|
-
indexes: recordType(stringType(),
|
5557
|
-
compositePrimaryKeys: recordType(stringType(),
|
5558
|
-
uniqueConstraints: recordType(stringType(),
|
5813
|
+
columns: recordType(stringType(), column4),
|
5814
|
+
indexes: recordType(stringType(), index4),
|
5815
|
+
compositePrimaryKeys: recordType(stringType(), compositePK4),
|
5816
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint4).default({})
|
5559
5817
|
}).strict();
|
5560
5818
|
var viewMeta2 = objectType({
|
5561
5819
|
algorithm: enumType(["undefined", "merge", "temptable"]),
|
5562
5820
|
sqlSecurity: enumType(["definer", "invoker"]),
|
5563
5821
|
withCheckOption: enumType(["local", "cascaded"]).optional()
|
5564
5822
|
}).strict();
|
5565
|
-
var
|
5823
|
+
var kitInternals4 = objectType({
|
5566
5824
|
tables: recordType(
|
5567
5825
|
stringType(),
|
5568
5826
|
objectType({
|
@@ -5583,25 +5841,25 @@ var kitInternals3 = objectType({
|
|
5583
5841
|
).optional()
|
5584
5842
|
}).optional();
|
5585
5843
|
var dialect2 = literalType("singlestore");
|
5586
|
-
var
|
5844
|
+
var schemaHash4 = objectType({
|
5587
5845
|
id: stringType(),
|
5588
5846
|
prevId: stringType()
|
5589
5847
|
});
|
5590
5848
|
var schemaInternal2 = objectType({
|
5591
5849
|
version: literalType("1"),
|
5592
5850
|
dialect: dialect2,
|
5593
|
-
tables: recordType(stringType(),
|
5851
|
+
tables: recordType(stringType(), table4),
|
5594
5852
|
/* views: record(string(), view).default({}), */
|
5595
5853
|
_meta: objectType({
|
5596
5854
|
tables: recordType(stringType(), stringType()),
|
5597
5855
|
columns: recordType(stringType(), stringType())
|
5598
5856
|
}),
|
5599
|
-
internal:
|
5857
|
+
internal: kitInternals4
|
5600
5858
|
}).strict();
|
5601
|
-
var schema2 = schemaInternal2.merge(
|
5602
|
-
var
|
5859
|
+
var schema2 = schemaInternal2.merge(schemaHash4);
|
5860
|
+
var tableSquashed4 = objectType({
|
5603
5861
|
name: stringType(),
|
5604
|
-
columns: recordType(stringType(),
|
5862
|
+
columns: recordType(stringType(), column4),
|
5605
5863
|
indexes: recordType(stringType(), stringType()),
|
5606
5864
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5607
5865
|
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
@@ -5609,7 +5867,7 @@ var tableSquashed3 = objectType({
|
|
5609
5867
|
var schemaSquashed2 = objectType({
|
5610
5868
|
version: literalType("1"),
|
5611
5869
|
dialect: dialect2,
|
5612
|
-
tables: recordType(stringType(),
|
5870
|
+
tables: recordType(stringType(), tableSquashed4)
|
5613
5871
|
/* views: record(string(), viewSquashed), */
|
5614
5872
|
}).strict();
|
5615
5873
|
var singlestoreSchema = schema2;
|
@@ -5630,13 +5888,13 @@ var drySingleStore = singlestoreSchema.parse({
|
|
5630
5888
|
});
|
5631
5889
|
|
5632
5890
|
// src/serializer/sqliteSchema.ts
|
5633
|
-
var
|
5891
|
+
var index5 = objectType({
|
5634
5892
|
name: stringType(),
|
5635
5893
|
columns: stringType().array(),
|
5636
5894
|
where: stringType().optional(),
|
5637
5895
|
isUnique: booleanType()
|
5638
5896
|
}).strict();
|
5639
|
-
var
|
5897
|
+
var fk4 = objectType({
|
5640
5898
|
name: stringType(),
|
5641
5899
|
tableFrom: stringType(),
|
5642
5900
|
columnsFrom: stringType().array(),
|
@@ -5645,11 +5903,11 @@ var fk3 = objectType({
|
|
5645
5903
|
onUpdate: stringType().optional(),
|
5646
5904
|
onDelete: stringType().optional()
|
5647
5905
|
}).strict();
|
5648
|
-
var
|
5906
|
+
var compositePK5 = objectType({
|
5649
5907
|
columns: stringType().array(),
|
5650
5908
|
name: stringType().optional()
|
5651
5909
|
}).strict();
|
5652
|
-
var
|
5910
|
+
var column5 = objectType({
|
5653
5911
|
name: stringType(),
|
5654
5912
|
type: stringType(),
|
5655
5913
|
primaryKey: booleanType(),
|
@@ -5663,35 +5921,35 @@ var column4 = objectType({
|
|
5663
5921
|
}).strict();
|
5664
5922
|
var tableV33 = objectType({
|
5665
5923
|
name: stringType(),
|
5666
|
-
columns: recordType(stringType(),
|
5667
|
-
indexes: recordType(stringType(),
|
5668
|
-
foreignKeys: recordType(stringType(),
|
5924
|
+
columns: recordType(stringType(), column5),
|
5925
|
+
indexes: recordType(stringType(), index5),
|
5926
|
+
foreignKeys: recordType(stringType(), fk4)
|
5669
5927
|
}).strict();
|
5670
|
-
var
|
5928
|
+
var uniqueConstraint5 = objectType({
|
5671
5929
|
name: stringType(),
|
5672
5930
|
columns: stringType().array()
|
5673
5931
|
}).strict();
|
5674
|
-
var
|
5932
|
+
var checkConstraint4 = objectType({
|
5675
5933
|
name: stringType(),
|
5676
5934
|
value: stringType()
|
5677
5935
|
}).strict();
|
5678
|
-
var
|
5936
|
+
var table5 = objectType({
|
5679
5937
|
name: stringType(),
|
5680
|
-
columns: recordType(stringType(),
|
5681
|
-
indexes: recordType(stringType(),
|
5682
|
-
foreignKeys: recordType(stringType(),
|
5683
|
-
compositePrimaryKeys: recordType(stringType(),
|
5684
|
-
uniqueConstraints: recordType(stringType(),
|
5685
|
-
checkConstraints: recordType(stringType(),
|
5938
|
+
columns: recordType(stringType(), column5),
|
5939
|
+
indexes: recordType(stringType(), index5),
|
5940
|
+
foreignKeys: recordType(stringType(), fk4),
|
5941
|
+
compositePrimaryKeys: recordType(stringType(), compositePK5),
|
5942
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint5).default({}),
|
5943
|
+
checkConstraints: recordType(stringType(), checkConstraint4).default({})
|
5686
5944
|
}).strict();
|
5687
|
-
var
|
5945
|
+
var view4 = objectType({
|
5688
5946
|
name: stringType(),
|
5689
|
-
columns: recordType(stringType(),
|
5947
|
+
columns: recordType(stringType(), column5),
|
5690
5948
|
definition: stringType().optional(),
|
5691
5949
|
isExisting: booleanType()
|
5692
5950
|
}).strict();
|
5693
5951
|
var dialect3 = enumType(["sqlite"]);
|
5694
|
-
var
|
5952
|
+
var schemaHash5 = objectType({
|
5695
5953
|
id: stringType(),
|
5696
5954
|
prevId: stringType()
|
5697
5955
|
}).strict();
|
@@ -5704,21 +5962,21 @@ var schemaInternalV32 = objectType({
|
|
5704
5962
|
var schemaInternalV42 = objectType({
|
5705
5963
|
version: literalType("4"),
|
5706
5964
|
dialect: dialect3,
|
5707
|
-
tables: recordType(stringType(),
|
5708
|
-
views: recordType(stringType(),
|
5965
|
+
tables: recordType(stringType(), table5),
|
5966
|
+
views: recordType(stringType(), view4).default({}),
|
5709
5967
|
enums: objectType({})
|
5710
5968
|
}).strict();
|
5711
5969
|
var schemaInternalV52 = objectType({
|
5712
5970
|
version: literalType("5"),
|
5713
5971
|
dialect: dialect3,
|
5714
|
-
tables: recordType(stringType(),
|
5972
|
+
tables: recordType(stringType(), table5),
|
5715
5973
|
enums: objectType({}),
|
5716
5974
|
_meta: objectType({
|
5717
5975
|
tables: recordType(stringType(), stringType()),
|
5718
5976
|
columns: recordType(stringType(), stringType())
|
5719
5977
|
})
|
5720
5978
|
}).strict();
|
5721
|
-
var
|
5979
|
+
var kitInternals5 = objectType({
|
5722
5980
|
indexes: recordType(
|
5723
5981
|
stringType(),
|
5724
5982
|
objectType({
|
@@ -5733,22 +5991,22 @@ var latestVersion = literalType("6");
|
|
5733
5991
|
var schemaInternal3 = objectType({
|
5734
5992
|
version: latestVersion,
|
5735
5993
|
dialect: dialect3,
|
5736
|
-
tables: recordType(stringType(),
|
5737
|
-
views: recordType(stringType(),
|
5994
|
+
tables: recordType(stringType(), table5),
|
5995
|
+
views: recordType(stringType(), view4).default({}),
|
5738
5996
|
enums: objectType({}),
|
5739
5997
|
_meta: objectType({
|
5740
5998
|
tables: recordType(stringType(), stringType()),
|
5741
5999
|
columns: recordType(stringType(), stringType())
|
5742
6000
|
}),
|
5743
|
-
internal:
|
6001
|
+
internal: kitInternals5
|
5744
6002
|
}).strict();
|
5745
|
-
var schemaV32 = schemaInternalV32.merge(
|
5746
|
-
var schemaV42 = schemaInternalV42.merge(
|
5747
|
-
var schemaV52 = schemaInternalV52.merge(
|
5748
|
-
var schema3 = schemaInternal3.merge(
|
5749
|
-
var
|
6003
|
+
var schemaV32 = schemaInternalV32.merge(schemaHash5).strict();
|
6004
|
+
var schemaV42 = schemaInternalV42.merge(schemaHash5).strict();
|
6005
|
+
var schemaV52 = schemaInternalV52.merge(schemaHash5).strict();
|
6006
|
+
var schema3 = schemaInternal3.merge(schemaHash5).strict();
|
6007
|
+
var tableSquashed5 = objectType({
|
5750
6008
|
name: stringType(),
|
5751
|
-
columns: recordType(stringType(),
|
6009
|
+
columns: recordType(stringType(), column5),
|
5752
6010
|
indexes: recordType(stringType(), stringType()),
|
5753
6011
|
foreignKeys: recordType(stringType(), stringType()),
|
5754
6012
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5758,8 +6016,8 @@ var tableSquashed4 = objectType({
|
|
5758
6016
|
var schemaSquashed3 = objectType({
|
5759
6017
|
version: latestVersion,
|
5760
6018
|
dialect: dialect3,
|
5761
|
-
tables: recordType(stringType(),
|
5762
|
-
views: recordType(stringType(),
|
6019
|
+
tables: recordType(stringType(), tableSquashed5),
|
6020
|
+
views: recordType(stringType(), view4),
|
5763
6021
|
enums: anyType()
|
5764
6022
|
}).strict();
|
5765
6023
|
var drySQLite = schema3.parse({
|
@@ -5831,6 +6089,8 @@ var validatorForDialect = (dialect4) => {
|
|
5831
6089
|
return { validator: backwardCompatibleMysqlSchema, version: 5 };
|
5832
6090
|
case "singlestore":
|
5833
6091
|
return { validator: backwardCompatibleSingleStoreSchema, version: 1 };
|
6092
|
+
case "gel":
|
6093
|
+
return { validator: backwardCompatibleGelSchema, version: 1 };
|
5834
6094
|
}
|
5835
6095
|
};
|
5836
6096
|
var validateWithReport = (snapshots, dialect4) => {
|
@@ -5940,8 +6200,8 @@ var tableRenameKey = (it) => {
|
|
5940
6200
|
const out = it.schema ? `"${it.schema}"."${it.name}"` : `"${it.name}"`;
|
5941
6201
|
return out;
|
5942
6202
|
};
|
5943
|
-
var columnRenameKey = (
|
5944
|
-
const out = schema4 ? `"${schema4}"."${
|
6203
|
+
var columnRenameKey = (table6, schema4, column6) => {
|
6204
|
+
const out = schema4 ? `"${schema4}"."${table6}"."${column6}"` : `"${table6}"."${column6}"`;
|
5945
6205
|
return out;
|
5946
6206
|
};
|
5947
6207
|
var kloudMeta = () => {
|