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