drizzle-kit 0.30.4-ffb171d → 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 +3562 -3387
- package/api.mjs +3562 -3387
- package/bin.cjs +19158 -3222
- 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 +5 -4
- package/utils.js +469 -209
- package/utils.mjs +469 -209
package/utils.mjs
CHANGED
@@ -410,8 +410,8 @@ var require_hanji = __commonJS({
|
|
410
410
|
};
|
411
411
|
exports.deferred = deferred;
|
412
412
|
var Terminal = class {
|
413
|
-
constructor(
|
414
|
-
this.view =
|
413
|
+
constructor(view5, stdin, stdout, closable) {
|
414
|
+
this.view = view5;
|
415
415
|
this.stdin = stdin;
|
416
416
|
this.stdout = stdout;
|
417
417
|
this.closable = closable;
|
@@ -449,7 +449,7 @@ var require_hanji = __commonJS({
|
|
449
449
|
this.resolve({ status: "submitted", data: this.view.result() });
|
450
450
|
return;
|
451
451
|
}
|
452
|
-
|
452
|
+
view5.input(str, key);
|
453
453
|
};
|
454
454
|
this.stdin.on("keypress", keypress);
|
455
455
|
this.view.attach(this);
|
@@ -511,8 +511,8 @@ var require_hanji = __commonJS({
|
|
511
511
|
};
|
512
512
|
exports.TaskView = TaskView2;
|
513
513
|
var TaskTerminal = class {
|
514
|
-
constructor(
|
515
|
-
this.view =
|
514
|
+
constructor(view5, stdout) {
|
515
|
+
this.view = view5;
|
516
516
|
this.stdout = stdout;
|
517
517
|
this.text = "";
|
518
518
|
this.view.attach(this);
|
@@ -531,22 +531,22 @@ var require_hanji = __commonJS({
|
|
531
531
|
}
|
532
532
|
};
|
533
533
|
exports.TaskTerminal = TaskTerminal;
|
534
|
-
function render2(
|
534
|
+
function render2(view5) {
|
535
535
|
const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
|
536
|
-
if (
|
537
|
-
const terminal = new Terminal(
|
536
|
+
if (view5 instanceof Prompt2) {
|
537
|
+
const terminal = new Terminal(view5, stdin, stdout, closable);
|
538
538
|
terminal.requestLayout();
|
539
539
|
return terminal.result();
|
540
540
|
}
|
541
|
-
stdout.write(`${
|
541
|
+
stdout.write(`${view5}
|
542
542
|
`);
|
543
543
|
closable.close();
|
544
544
|
return;
|
545
545
|
}
|
546
546
|
exports.render = render2;
|
547
|
-
function renderWithTask(
|
547
|
+
function renderWithTask(view5, task) {
|
548
548
|
return __awaiter(this, void 0, void 0, function* () {
|
549
|
-
const terminal = new TaskTerminal(
|
549
|
+
const terminal = new TaskTerminal(view5, process.stdout);
|
550
550
|
terminal.requestLayout();
|
551
551
|
const result = yield task;
|
552
552
|
terminal.clear();
|
@@ -876,30 +876,30 @@ var supports_color_default = supportsColor;
|
|
876
876
|
|
877
877
|
// ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
878
878
|
function stringReplaceAll(string, substring, replacer) {
|
879
|
-
let
|
880
|
-
if (
|
879
|
+
let index6 = string.indexOf(substring);
|
880
|
+
if (index6 === -1) {
|
881
881
|
return string;
|
882
882
|
}
|
883
883
|
const substringLength = substring.length;
|
884
884
|
let endIndex = 0;
|
885
885
|
let returnValue = "";
|
886
886
|
do {
|
887
|
-
returnValue += string.slice(endIndex,
|
888
|
-
endIndex =
|
889
|
-
|
890
|
-
} while (
|
887
|
+
returnValue += string.slice(endIndex, index6) + substring + replacer;
|
888
|
+
endIndex = index6 + substringLength;
|
889
|
+
index6 = string.indexOf(substring, endIndex);
|
890
|
+
} while (index6 !== -1);
|
891
891
|
returnValue += string.slice(endIndex);
|
892
892
|
return returnValue;
|
893
893
|
}
|
894
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix,
|
894
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index6) {
|
895
895
|
let endIndex = 0;
|
896
896
|
let returnValue = "";
|
897
897
|
do {
|
898
|
-
const gotCR = string[
|
899
|
-
returnValue += string.slice(endIndex, gotCR ?
|
900
|
-
endIndex =
|
901
|
-
|
902
|
-
} while (
|
898
|
+
const gotCR = string[index6 - 1] === "\r";
|
899
|
+
returnValue += string.slice(endIndex, gotCR ? index6 - 1 : index6) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
900
|
+
endIndex = index6 + 1;
|
901
|
+
index6 = string.indexOf("\n", endIndex);
|
902
|
+
} while (index6 !== -1);
|
903
903
|
returnValue += string.slice(endIndex);
|
904
904
|
return returnValue;
|
905
905
|
}
|
@@ -3426,10 +3426,10 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
3426
3426
|
// }) as any;
|
3427
3427
|
// return merged;
|
3428
3428
|
// }
|
3429
|
-
catchall(
|
3429
|
+
catchall(index6) {
|
3430
3430
|
return new _ZodObject({
|
3431
3431
|
...this._def,
|
3432
|
-
catchall:
|
3432
|
+
catchall: index6
|
3433
3433
|
});
|
3434
3434
|
}
|
3435
3435
|
pick(mask) {
|
@@ -3747,9 +3747,9 @@ function mergeValues(a, b) {
|
|
3747
3747
|
return { valid: false };
|
3748
3748
|
}
|
3749
3749
|
const newArray = [];
|
3750
|
-
for (let
|
3751
|
-
const itemA = a[
|
3752
|
-
const itemB = b[
|
3750
|
+
for (let index6 = 0; index6 < a.length; index6++) {
|
3751
|
+
const itemA = a[index6];
|
3752
|
+
const itemB = b[index6];
|
3753
3753
|
const sharedValue = mergeValues(itemA, itemB);
|
3754
3754
|
if (!sharedValue.valid) {
|
3755
3755
|
return { valid: false };
|
@@ -3955,10 +3955,10 @@ var ZodMap = class extends ZodType {
|
|
3955
3955
|
}
|
3956
3956
|
const keyType = this._def.keyType;
|
3957
3957
|
const valueType = this._def.valueType;
|
3958
|
-
const pairs = [...ctx.data.entries()].map(([key, value],
|
3958
|
+
const pairs = [...ctx.data.entries()].map(([key, value], index6) => {
|
3959
3959
|
return {
|
3960
|
-
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [
|
3961
|
-
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [
|
3960
|
+
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index6, "key"])),
|
3961
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index6, "value"]))
|
3962
3962
|
};
|
3963
3963
|
});
|
3964
3964
|
if (ctx.common.async) {
|
@@ -4835,8 +4835,266 @@ var nullableType = ZodNullable.create;
|
|
4835
4835
|
var preprocessType = ZodEffects.createWithPreprocess;
|
4836
4836
|
var pipelineType = ZodPipeline.create;
|
4837
4837
|
|
4838
|
-
// src/serializer/
|
4838
|
+
// src/serializer/gelSchema.ts
|
4839
|
+
var enumSchema = objectType({
|
4840
|
+
name: stringType(),
|
4841
|
+
schema: stringType(),
|
4842
|
+
values: stringType().array()
|
4843
|
+
}).strict();
|
4844
|
+
var enumSchemaV1 = objectType({
|
4845
|
+
name: stringType(),
|
4846
|
+
values: recordType(stringType(), stringType())
|
4847
|
+
}).strict();
|
4848
|
+
var indexColumn = objectType({
|
4849
|
+
expression: stringType(),
|
4850
|
+
isExpression: booleanType(),
|
4851
|
+
asc: booleanType(),
|
4852
|
+
nulls: stringType().optional(),
|
4853
|
+
opclass: stringType().optional()
|
4854
|
+
});
|
4839
4855
|
var index = objectType({
|
4856
|
+
name: stringType(),
|
4857
|
+
columns: indexColumn.array(),
|
4858
|
+
isUnique: booleanType(),
|
4859
|
+
with: recordType(stringType(), anyType()).optional(),
|
4860
|
+
method: stringType().default("btree"),
|
4861
|
+
where: stringType().optional(),
|
4862
|
+
concurrently: booleanType().default(false)
|
4863
|
+
}).strict();
|
4864
|
+
var fk = objectType({
|
4865
|
+
name: stringType(),
|
4866
|
+
tableFrom: stringType(),
|
4867
|
+
columnsFrom: stringType().array(),
|
4868
|
+
tableTo: stringType(),
|
4869
|
+
schemaTo: stringType().optional(),
|
4870
|
+
columnsTo: stringType().array(),
|
4871
|
+
onUpdate: stringType().optional(),
|
4872
|
+
onDelete: stringType().optional()
|
4873
|
+
}).strict();
|
4874
|
+
var sequenceSchema = objectType({
|
4875
|
+
name: stringType(),
|
4876
|
+
increment: stringType().optional(),
|
4877
|
+
minValue: stringType().optional(),
|
4878
|
+
maxValue: stringType().optional(),
|
4879
|
+
startWith: stringType().optional(),
|
4880
|
+
cache: stringType().optional(),
|
4881
|
+
cycle: booleanType().optional(),
|
4882
|
+
schema: stringType()
|
4883
|
+
}).strict();
|
4884
|
+
var roleSchema = objectType({
|
4885
|
+
name: stringType(),
|
4886
|
+
createDb: booleanType().optional(),
|
4887
|
+
createRole: booleanType().optional(),
|
4888
|
+
inherit: booleanType().optional()
|
4889
|
+
}).strict();
|
4890
|
+
var sequenceSquashed = objectType({
|
4891
|
+
name: stringType(),
|
4892
|
+
schema: stringType(),
|
4893
|
+
values: stringType()
|
4894
|
+
}).strict();
|
4895
|
+
var column = objectType({
|
4896
|
+
name: stringType(),
|
4897
|
+
type: stringType(),
|
4898
|
+
typeSchema: stringType().optional(),
|
4899
|
+
primaryKey: booleanType(),
|
4900
|
+
notNull: booleanType(),
|
4901
|
+
default: anyType().optional(),
|
4902
|
+
isUnique: anyType().optional(),
|
4903
|
+
uniqueName: stringType().optional(),
|
4904
|
+
nullsNotDistinct: booleanType().optional(),
|
4905
|
+
generated: objectType({
|
4906
|
+
type: literalType("stored"),
|
4907
|
+
as: stringType()
|
4908
|
+
}).optional(),
|
4909
|
+
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
4910
|
+
}).strict();
|
4911
|
+
var checkConstraint = objectType({
|
4912
|
+
name: stringType(),
|
4913
|
+
value: stringType()
|
4914
|
+
}).strict();
|
4915
|
+
var columnSquashed = objectType({
|
4916
|
+
name: stringType(),
|
4917
|
+
type: stringType(),
|
4918
|
+
typeSchema: stringType().optional(),
|
4919
|
+
primaryKey: booleanType(),
|
4920
|
+
notNull: booleanType(),
|
4921
|
+
default: anyType().optional(),
|
4922
|
+
isUnique: anyType().optional(),
|
4923
|
+
uniqueName: stringType().optional(),
|
4924
|
+
nullsNotDistinct: booleanType().optional(),
|
4925
|
+
generated: objectType({
|
4926
|
+
type: literalType("stored"),
|
4927
|
+
as: stringType()
|
4928
|
+
}).optional(),
|
4929
|
+
identity: stringType().optional()
|
4930
|
+
}).strict();
|
4931
|
+
var compositePK = objectType({
|
4932
|
+
name: stringType(),
|
4933
|
+
columns: stringType().array()
|
4934
|
+
}).strict();
|
4935
|
+
var uniqueConstraint = objectType({
|
4936
|
+
name: stringType(),
|
4937
|
+
columns: stringType().array(),
|
4938
|
+
nullsNotDistinct: booleanType()
|
4939
|
+
}).strict();
|
4940
|
+
var policy = objectType({
|
4941
|
+
name: stringType(),
|
4942
|
+
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
4943
|
+
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
4944
|
+
to: stringType().array().optional(),
|
4945
|
+
using: stringType().optional(),
|
4946
|
+
withCheck: stringType().optional(),
|
4947
|
+
on: stringType().optional(),
|
4948
|
+
schema: stringType().optional()
|
4949
|
+
}).strict();
|
4950
|
+
var policySquashed = objectType({
|
4951
|
+
name: stringType(),
|
4952
|
+
values: stringType()
|
4953
|
+
}).strict();
|
4954
|
+
var viewWithOption = objectType({
|
4955
|
+
checkOption: enumType(["local", "cascaded"]).optional(),
|
4956
|
+
securityBarrier: booleanType().optional(),
|
4957
|
+
securityInvoker: booleanType().optional()
|
4958
|
+
}).strict();
|
4959
|
+
var matViewWithOption = objectType({
|
4960
|
+
fillfactor: numberType().optional(),
|
4961
|
+
toastTupleTarget: numberType().optional(),
|
4962
|
+
parallelWorkers: numberType().optional(),
|
4963
|
+
autovacuumEnabled: booleanType().optional(),
|
4964
|
+
vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
|
4965
|
+
vacuumTruncate: booleanType().optional(),
|
4966
|
+
autovacuumVacuumThreshold: numberType().optional(),
|
4967
|
+
autovacuumVacuumScaleFactor: numberType().optional(),
|
4968
|
+
autovacuumVacuumCostDelay: numberType().optional(),
|
4969
|
+
autovacuumVacuumCostLimit: numberType().optional(),
|
4970
|
+
autovacuumFreezeMinAge: numberType().optional(),
|
4971
|
+
autovacuumFreezeMaxAge: numberType().optional(),
|
4972
|
+
autovacuumFreezeTableAge: numberType().optional(),
|
4973
|
+
autovacuumMultixactFreezeMinAge: numberType().optional(),
|
4974
|
+
autovacuumMultixactFreezeMaxAge: numberType().optional(),
|
4975
|
+
autovacuumMultixactFreezeTableAge: numberType().optional(),
|
4976
|
+
logAutovacuumMinDuration: numberType().optional(),
|
4977
|
+
userCatalogTable: booleanType().optional()
|
4978
|
+
}).strict();
|
4979
|
+
var mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
|
4980
|
+
var view = objectType({
|
4981
|
+
name: stringType(),
|
4982
|
+
schema: stringType(),
|
4983
|
+
columns: recordType(stringType(), column),
|
4984
|
+
definition: stringType().optional(),
|
4985
|
+
materialized: booleanType(),
|
4986
|
+
with: mergedViewWithOption.optional(),
|
4987
|
+
isExisting: booleanType(),
|
4988
|
+
withNoData: booleanType().optional(),
|
4989
|
+
using: stringType().optional(),
|
4990
|
+
tablespace: stringType().optional()
|
4991
|
+
}).strict();
|
4992
|
+
var table = objectType({
|
4993
|
+
name: stringType(),
|
4994
|
+
schema: stringType(),
|
4995
|
+
columns: recordType(stringType(), column),
|
4996
|
+
indexes: recordType(stringType(), index),
|
4997
|
+
foreignKeys: recordType(stringType(), fk),
|
4998
|
+
compositePrimaryKeys: recordType(stringType(), compositePK),
|
4999
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
|
5000
|
+
policies: recordType(stringType(), policy).default({}),
|
5001
|
+
checkConstraints: recordType(stringType(), checkConstraint).default({}),
|
5002
|
+
isRLSEnabled: booleanType().default(false)
|
5003
|
+
}).strict();
|
5004
|
+
var schemaHash = objectType({
|
5005
|
+
id: stringType(),
|
5006
|
+
prevId: stringType()
|
5007
|
+
});
|
5008
|
+
var kitInternals = objectType({
|
5009
|
+
tables: recordType(
|
5010
|
+
stringType(),
|
5011
|
+
objectType({
|
5012
|
+
columns: recordType(
|
5013
|
+
stringType(),
|
5014
|
+
objectType({
|
5015
|
+
isArray: booleanType().optional(),
|
5016
|
+
dimensions: numberType().optional(),
|
5017
|
+
rawType: stringType().optional(),
|
5018
|
+
isDefaultAnExpression: booleanType().optional()
|
5019
|
+
}).optional()
|
5020
|
+
)
|
5021
|
+
}).optional()
|
5022
|
+
)
|
5023
|
+
}).optional();
|
5024
|
+
var gelSchemaExternal = objectType({
|
5025
|
+
version: literalType("1"),
|
5026
|
+
dialect: literalType("gel"),
|
5027
|
+
tables: arrayType(table),
|
5028
|
+
enums: arrayType(enumSchemaV1),
|
5029
|
+
schemas: arrayType(objectType({ name: stringType() })),
|
5030
|
+
_meta: objectType({
|
5031
|
+
schemas: recordType(stringType(), stringType()),
|
5032
|
+
tables: recordType(stringType(), stringType()),
|
5033
|
+
columns: recordType(stringType(), stringType())
|
5034
|
+
})
|
5035
|
+
}).strict();
|
5036
|
+
var gelSchemaInternal = objectType({
|
5037
|
+
version: literalType("1"),
|
5038
|
+
dialect: literalType("gel"),
|
5039
|
+
tables: recordType(stringType(), table),
|
5040
|
+
enums: recordType(stringType(), enumSchema),
|
5041
|
+
schemas: recordType(stringType(), stringType()),
|
5042
|
+
views: recordType(stringType(), view).default({}),
|
5043
|
+
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5044
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5045
|
+
policies: recordType(stringType(), policy).default({}),
|
5046
|
+
_meta: objectType({
|
5047
|
+
schemas: recordType(stringType(), stringType()),
|
5048
|
+
tables: recordType(stringType(), stringType()),
|
5049
|
+
columns: recordType(stringType(), stringType())
|
5050
|
+
}),
|
5051
|
+
internal: kitInternals
|
5052
|
+
}).strict();
|
5053
|
+
var tableSquashed = objectType({
|
5054
|
+
name: stringType(),
|
5055
|
+
schema: stringType(),
|
5056
|
+
columns: recordType(stringType(), columnSquashed),
|
5057
|
+
indexes: recordType(stringType(), stringType()),
|
5058
|
+
foreignKeys: recordType(stringType(), stringType()),
|
5059
|
+
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5060
|
+
uniqueConstraints: recordType(stringType(), stringType()),
|
5061
|
+
policies: recordType(stringType(), stringType()),
|
5062
|
+
checkConstraints: recordType(stringType(), stringType()),
|
5063
|
+
isRLSEnabled: booleanType().default(false)
|
5064
|
+
}).strict();
|
5065
|
+
var gelSchemaSquashed = objectType({
|
5066
|
+
version: literalType("1"),
|
5067
|
+
dialect: literalType("gel"),
|
5068
|
+
tables: recordType(stringType(), tableSquashed),
|
5069
|
+
enums: recordType(stringType(), enumSchema),
|
5070
|
+
schemas: recordType(stringType(), stringType()),
|
5071
|
+
views: recordType(stringType(), view),
|
5072
|
+
sequences: recordType(stringType(), sequenceSquashed),
|
5073
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5074
|
+
policies: recordType(stringType(), policySquashed).default({})
|
5075
|
+
}).strict();
|
5076
|
+
var gelSchema = gelSchemaInternal.merge(schemaHash);
|
5077
|
+
var backwardCompatibleGelSchema = gelSchema;
|
5078
|
+
var dryGel = gelSchema.parse({
|
5079
|
+
version: "1",
|
5080
|
+
dialect: "gel",
|
5081
|
+
id: originUUID,
|
5082
|
+
prevId: "",
|
5083
|
+
tables: {},
|
5084
|
+
enums: {},
|
5085
|
+
schemas: {},
|
5086
|
+
policies: {},
|
5087
|
+
roles: {},
|
5088
|
+
sequences: {},
|
5089
|
+
_meta: {
|
5090
|
+
schemas: {},
|
5091
|
+
tables: {},
|
5092
|
+
columns: {}
|
5093
|
+
}
|
5094
|
+
});
|
5095
|
+
|
5096
|
+
// src/serializer/mysqlSchema.ts
|
5097
|
+
var index2 = objectType({
|
4840
5098
|
name: stringType(),
|
4841
5099
|
columns: stringType().array(),
|
4842
5100
|
isUnique: booleanType(),
|
@@ -4844,7 +5102,7 @@ var index = objectType({
|
|
4844
5102
|
algorithm: enumType(["default", "inplace", "copy"]).optional(),
|
4845
5103
|
lock: enumType(["default", "none", "shared", "exclusive"]).optional()
|
4846
5104
|
}).strict();
|
4847
|
-
var
|
5105
|
+
var fk2 = objectType({
|
4848
5106
|
name: stringType(),
|
4849
5107
|
tableFrom: stringType(),
|
4850
5108
|
columnsFrom: stringType().array(),
|
@@ -4853,7 +5111,7 @@ var fk = objectType({
|
|
4853
5111
|
onUpdate: stringType().optional(),
|
4854
5112
|
onDelete: stringType().optional()
|
4855
5113
|
}).strict();
|
4856
|
-
var
|
5114
|
+
var column2 = objectType({
|
4857
5115
|
name: stringType(),
|
4858
5116
|
type: stringType(),
|
4859
5117
|
primaryKey: booleanType(),
|
@@ -4868,50 +5126,50 @@ var column = objectType({
|
|
4868
5126
|
}).strict();
|
4869
5127
|
var tableV3 = objectType({
|
4870
5128
|
name: stringType(),
|
4871
|
-
columns: recordType(stringType(),
|
4872
|
-
indexes: recordType(stringType(),
|
4873
|
-
foreignKeys: recordType(stringType(),
|
5129
|
+
columns: recordType(stringType(), column2),
|
5130
|
+
indexes: recordType(stringType(), index2),
|
5131
|
+
foreignKeys: recordType(stringType(), fk2)
|
4874
5132
|
}).strict();
|
4875
|
-
var
|
5133
|
+
var compositePK2 = objectType({
|
4876
5134
|
name: stringType(),
|
4877
5135
|
columns: stringType().array()
|
4878
5136
|
}).strict();
|
4879
|
-
var
|
5137
|
+
var uniqueConstraint2 = objectType({
|
4880
5138
|
name: stringType(),
|
4881
5139
|
columns: stringType().array()
|
4882
5140
|
}).strict();
|
4883
|
-
var
|
5141
|
+
var checkConstraint2 = objectType({
|
4884
5142
|
name: stringType(),
|
4885
5143
|
value: stringType()
|
4886
5144
|
}).strict();
|
4887
5145
|
var tableV4 = objectType({
|
4888
5146
|
name: stringType(),
|
4889
5147
|
schema: stringType().optional(),
|
4890
|
-
columns: recordType(stringType(),
|
4891
|
-
indexes: recordType(stringType(),
|
4892
|
-
foreignKeys: recordType(stringType(),
|
5148
|
+
columns: recordType(stringType(), column2),
|
5149
|
+
indexes: recordType(stringType(), index2),
|
5150
|
+
foreignKeys: recordType(stringType(), fk2)
|
4893
5151
|
}).strict();
|
4894
|
-
var
|
5152
|
+
var table2 = objectType({
|
4895
5153
|
name: stringType(),
|
4896
|
-
columns: recordType(stringType(),
|
4897
|
-
indexes: recordType(stringType(),
|
4898
|
-
foreignKeys: recordType(stringType(),
|
4899
|
-
compositePrimaryKeys: recordType(stringType(),
|
4900
|
-
uniqueConstraints: recordType(stringType(),
|
4901
|
-
checkConstraint: recordType(stringType(),
|
5154
|
+
columns: recordType(stringType(), column2),
|
5155
|
+
indexes: recordType(stringType(), index2),
|
5156
|
+
foreignKeys: recordType(stringType(), fk2),
|
5157
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5158
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5159
|
+
checkConstraint: recordType(stringType(), checkConstraint2).default({})
|
4902
5160
|
}).strict();
|
4903
5161
|
var viewMeta = objectType({
|
4904
5162
|
algorithm: enumType(["undefined", "merge", "temptable"]),
|
4905
5163
|
sqlSecurity: enumType(["definer", "invoker"]),
|
4906
5164
|
withCheckOption: enumType(["local", "cascaded"]).optional()
|
4907
5165
|
}).strict();
|
4908
|
-
var
|
5166
|
+
var view2 = objectType({
|
4909
5167
|
name: stringType(),
|
4910
|
-
columns: recordType(stringType(),
|
5168
|
+
columns: recordType(stringType(), column2),
|
4911
5169
|
definition: stringType().optional(),
|
4912
5170
|
isExisting: booleanType()
|
4913
5171
|
}).strict().merge(viewMeta);
|
4914
|
-
var
|
5172
|
+
var kitInternals2 = objectType({
|
4915
5173
|
tables: recordType(
|
4916
5174
|
stringType(),
|
4917
5175
|
objectType({
|
@@ -4932,7 +5190,7 @@ var kitInternals = objectType({
|
|
4932
5190
|
).optional()
|
4933
5191
|
}).optional();
|
4934
5192
|
var dialect = literalType("mysql");
|
4935
|
-
var
|
5193
|
+
var schemaHash2 = objectType({
|
4936
5194
|
id: stringType(),
|
4937
5195
|
prevId: stringType()
|
4938
5196
|
});
|
@@ -4950,47 +5208,47 @@ var schemaInternalV4 = objectType({
|
|
4950
5208
|
var schemaInternalV5 = objectType({
|
4951
5209
|
version: literalType("5"),
|
4952
5210
|
dialect,
|
4953
|
-
tables: recordType(stringType(),
|
5211
|
+
tables: recordType(stringType(), table2),
|
4954
5212
|
schemas: recordType(stringType(), stringType()),
|
4955
5213
|
_meta: objectType({
|
4956
5214
|
schemas: recordType(stringType(), stringType()),
|
4957
5215
|
tables: recordType(stringType(), stringType()),
|
4958
5216
|
columns: recordType(stringType(), stringType())
|
4959
5217
|
}),
|
4960
|
-
internal:
|
5218
|
+
internal: kitInternals2
|
4961
5219
|
}).strict();
|
4962
5220
|
var schemaInternal = objectType({
|
4963
5221
|
version: literalType("5"),
|
4964
5222
|
dialect,
|
4965
|
-
tables: recordType(stringType(),
|
4966
|
-
views: recordType(stringType(),
|
5223
|
+
tables: recordType(stringType(), table2),
|
5224
|
+
views: recordType(stringType(), view2).default({}),
|
4967
5225
|
_meta: objectType({
|
4968
5226
|
tables: recordType(stringType(), stringType()),
|
4969
5227
|
columns: recordType(stringType(), stringType())
|
4970
5228
|
}),
|
4971
|
-
internal:
|
5229
|
+
internal: kitInternals2
|
4972
5230
|
}).strict();
|
4973
|
-
var schemaV3 = schemaInternalV3.merge(
|
4974
|
-
var schemaV4 = schemaInternalV4.merge(
|
4975
|
-
var schemaV5 = schemaInternalV5.merge(
|
4976
|
-
var schema = schemaInternal.merge(
|
5231
|
+
var schemaV3 = schemaInternalV3.merge(schemaHash2);
|
5232
|
+
var schemaV4 = schemaInternalV4.merge(schemaHash2);
|
5233
|
+
var schemaV5 = schemaInternalV5.merge(schemaHash2);
|
5234
|
+
var schema = schemaInternal.merge(schemaHash2);
|
4977
5235
|
var tableSquashedV4 = objectType({
|
4978
5236
|
name: stringType(),
|
4979
5237
|
schema: stringType().optional(),
|
4980
|
-
columns: recordType(stringType(),
|
5238
|
+
columns: recordType(stringType(), column2),
|
4981
5239
|
indexes: recordType(stringType(), stringType()),
|
4982
5240
|
foreignKeys: recordType(stringType(), stringType())
|
4983
5241
|
}).strict();
|
4984
|
-
var
|
5242
|
+
var tableSquashed2 = objectType({
|
4985
5243
|
name: stringType(),
|
4986
|
-
columns: recordType(stringType(),
|
5244
|
+
columns: recordType(stringType(), column2),
|
4987
5245
|
indexes: recordType(stringType(), stringType()),
|
4988
5246
|
foreignKeys: recordType(stringType(), stringType()),
|
4989
5247
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
4990
5248
|
uniqueConstraints: recordType(stringType(), stringType()).default({}),
|
4991
5249
|
checkConstraints: recordType(stringType(), stringType()).default({})
|
4992
5250
|
}).strict();
|
4993
|
-
var viewSquashed =
|
5251
|
+
var viewSquashed = view2.omit({
|
4994
5252
|
algorithm: true,
|
4995
5253
|
sqlSecurity: true,
|
4996
5254
|
withCheckOption: true
|
@@ -4998,7 +5256,7 @@ var viewSquashed = view.omit({
|
|
4998
5256
|
var schemaSquashed = objectType({
|
4999
5257
|
version: literalType("5"),
|
5000
5258
|
dialect,
|
5001
|
-
tables: recordType(stringType(),
|
5259
|
+
tables: recordType(stringType(), tableSquashed2),
|
5002
5260
|
views: recordType(stringType(), viewSquashed)
|
5003
5261
|
}).strict();
|
5004
5262
|
var schemaSquashedV4 = objectType({
|
@@ -5049,11 +5307,11 @@ var tableV2 = objectType({
|
|
5049
5307
|
columns: recordType(stringType(), columnV2),
|
5050
5308
|
indexes: recordType(stringType(), indexV2)
|
5051
5309
|
}).strict();
|
5052
|
-
var
|
5310
|
+
var enumSchemaV12 = objectType({
|
5053
5311
|
name: stringType(),
|
5054
5312
|
values: recordType(stringType(), stringType())
|
5055
5313
|
}).strict();
|
5056
|
-
var
|
5314
|
+
var enumSchema2 = objectType({
|
5057
5315
|
name: stringType(),
|
5058
5316
|
schema: stringType(),
|
5059
5317
|
values: stringType().array()
|
@@ -5061,7 +5319,7 @@ var enumSchema = objectType({
|
|
5061
5319
|
var pgSchemaV2 = objectType({
|
5062
5320
|
version: literalType("2"),
|
5063
5321
|
tables: recordType(stringType(), tableV2),
|
5064
|
-
enums: recordType(stringType(),
|
5322
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5065
5323
|
}).strict();
|
5066
5324
|
var references = objectType({
|
5067
5325
|
foreignKeyName: stringType(),
|
@@ -5086,18 +5344,18 @@ var tableV1 = objectType({
|
|
5086
5344
|
var pgSchemaV1 = objectType({
|
5087
5345
|
version: literalType("1"),
|
5088
5346
|
tables: recordType(stringType(), tableV1),
|
5089
|
-
enums: recordType(stringType(),
|
5347
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5090
5348
|
}).strict();
|
5091
|
-
var
|
5349
|
+
var indexColumn2 = objectType({
|
5092
5350
|
expression: stringType(),
|
5093
5351
|
isExpression: booleanType(),
|
5094
5352
|
asc: booleanType(),
|
5095
5353
|
nulls: stringType().optional(),
|
5096
5354
|
opclass: stringType().optional()
|
5097
5355
|
});
|
5098
|
-
var
|
5356
|
+
var index3 = objectType({
|
5099
5357
|
name: stringType(),
|
5100
|
-
columns:
|
5358
|
+
columns: indexColumn2.array(),
|
5101
5359
|
isUnique: booleanType(),
|
5102
5360
|
with: recordType(stringType(), anyType()).optional(),
|
5103
5361
|
method: stringType().default("btree"),
|
@@ -5131,7 +5389,7 @@ var indexV6 = objectType({
|
|
5131
5389
|
where: stringType().optional(),
|
5132
5390
|
concurrently: booleanType().default(false)
|
5133
5391
|
}).strict();
|
5134
|
-
var
|
5392
|
+
var fk3 = objectType({
|
5135
5393
|
name: stringType(),
|
5136
5394
|
tableFrom: stringType(),
|
5137
5395
|
columnsFrom: stringType().array(),
|
@@ -5141,7 +5399,7 @@ var fk2 = objectType({
|
|
5141
5399
|
onUpdate: stringType().optional(),
|
5142
5400
|
onDelete: stringType().optional()
|
5143
5401
|
}).strict();
|
5144
|
-
var
|
5402
|
+
var sequenceSchema2 = objectType({
|
5145
5403
|
name: stringType(),
|
5146
5404
|
increment: stringType().optional(),
|
5147
5405
|
minValue: stringType().optional(),
|
@@ -5151,13 +5409,13 @@ var sequenceSchema = objectType({
|
|
5151
5409
|
cycle: booleanType().optional(),
|
5152
5410
|
schema: stringType()
|
5153
5411
|
}).strict();
|
5154
|
-
var
|
5412
|
+
var roleSchema2 = objectType({
|
5155
5413
|
name: stringType(),
|
5156
5414
|
createDb: booleanType().optional(),
|
5157
5415
|
createRole: booleanType().optional(),
|
5158
5416
|
inherit: booleanType().optional()
|
5159
5417
|
}).strict();
|
5160
|
-
var
|
5418
|
+
var sequenceSquashed2 = objectType({
|
5161
5419
|
name: stringType(),
|
5162
5420
|
schema: stringType(),
|
5163
5421
|
values: stringType()
|
@@ -5173,7 +5431,7 @@ var columnV7 = objectType({
|
|
5173
5431
|
uniqueName: stringType().optional(),
|
5174
5432
|
nullsNotDistinct: booleanType().optional()
|
5175
5433
|
}).strict();
|
5176
|
-
var
|
5434
|
+
var column3 = objectType({
|
5177
5435
|
name: stringType(),
|
5178
5436
|
type: stringType(),
|
5179
5437
|
typeSchema: stringType().optional(),
|
@@ -5187,13 +5445,13 @@ var column2 = objectType({
|
|
5187
5445
|
type: literalType("stored"),
|
5188
5446
|
as: stringType()
|
5189
5447
|
}).optional(),
|
5190
|
-
identity:
|
5448
|
+
identity: sequenceSchema2.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5191
5449
|
}).strict();
|
5192
|
-
var
|
5450
|
+
var checkConstraint3 = objectType({
|
5193
5451
|
name: stringType(),
|
5194
5452
|
value: stringType()
|
5195
5453
|
}).strict();
|
5196
|
-
var
|
5454
|
+
var columnSquashed2 = objectType({
|
5197
5455
|
name: stringType(),
|
5198
5456
|
type: stringType(),
|
5199
5457
|
typeSchema: stringType().optional(),
|
@@ -5211,20 +5469,20 @@ var columnSquashed = objectType({
|
|
5211
5469
|
}).strict();
|
5212
5470
|
var tableV32 = objectType({
|
5213
5471
|
name: stringType(),
|
5214
|
-
columns: recordType(stringType(),
|
5215
|
-
indexes: recordType(stringType(),
|
5216
|
-
foreignKeys: recordType(stringType(),
|
5472
|
+
columns: recordType(stringType(), column3),
|
5473
|
+
indexes: recordType(stringType(), index3),
|
5474
|
+
foreignKeys: recordType(stringType(), fk3)
|
5217
5475
|
}).strict();
|
5218
|
-
var
|
5476
|
+
var compositePK3 = objectType({
|
5219
5477
|
name: stringType(),
|
5220
5478
|
columns: stringType().array()
|
5221
5479
|
}).strict();
|
5222
|
-
var
|
5480
|
+
var uniqueConstraint3 = objectType({
|
5223
5481
|
name: stringType(),
|
5224
5482
|
columns: stringType().array(),
|
5225
5483
|
nullsNotDistinct: booleanType()
|
5226
5484
|
}).strict();
|
5227
|
-
var
|
5485
|
+
var policy2 = objectType({
|
5228
5486
|
name: stringType(),
|
5229
5487
|
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
5230
5488
|
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
@@ -5234,16 +5492,16 @@ var policy = objectType({
|
|
5234
5492
|
on: stringType().optional(),
|
5235
5493
|
schema: stringType().optional()
|
5236
5494
|
}).strict();
|
5237
|
-
var
|
5495
|
+
var policySquashed2 = objectType({
|
5238
5496
|
name: stringType(),
|
5239
5497
|
values: stringType()
|
5240
5498
|
}).strict();
|
5241
|
-
var
|
5499
|
+
var viewWithOption2 = objectType({
|
5242
5500
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
5243
5501
|
securityBarrier: booleanType().optional(),
|
5244
5502
|
securityInvoker: booleanType().optional()
|
5245
5503
|
}).strict();
|
5246
|
-
var
|
5504
|
+
var matViewWithOption2 = objectType({
|
5247
5505
|
fillfactor: numberType().optional(),
|
5248
5506
|
toastTupleTarget: numberType().optional(),
|
5249
5507
|
parallelWorkers: numberType().optional(),
|
@@ -5263,14 +5521,14 @@ var matViewWithOption = objectType({
|
|
5263
5521
|
logAutovacuumMinDuration: numberType().optional(),
|
5264
5522
|
userCatalogTable: booleanType().optional()
|
5265
5523
|
}).strict();
|
5266
|
-
var
|
5267
|
-
var
|
5524
|
+
var mergedViewWithOption2 = viewWithOption2.merge(matViewWithOption2).strict();
|
5525
|
+
var view3 = objectType({
|
5268
5526
|
name: stringType(),
|
5269
5527
|
schema: stringType(),
|
5270
|
-
columns: recordType(stringType(),
|
5528
|
+
columns: recordType(stringType(), column3),
|
5271
5529
|
definition: stringType().optional(),
|
5272
5530
|
materialized: booleanType(),
|
5273
|
-
with:
|
5531
|
+
with: mergedViewWithOption2.optional(),
|
5274
5532
|
isExisting: booleanType(),
|
5275
5533
|
withNoData: booleanType().optional(),
|
5276
5534
|
using: stringType().optional(),
|
@@ -5279,54 +5537,54 @@ var view2 = objectType({
|
|
5279
5537
|
var tableV42 = objectType({
|
5280
5538
|
name: stringType(),
|
5281
5539
|
schema: stringType(),
|
5282
|
-
columns: recordType(stringType(),
|
5540
|
+
columns: recordType(stringType(), column3),
|
5283
5541
|
indexes: recordType(stringType(), indexV4),
|
5284
|
-
foreignKeys: recordType(stringType(),
|
5542
|
+
foreignKeys: recordType(stringType(), fk3)
|
5285
5543
|
}).strict();
|
5286
5544
|
var tableV5 = objectType({
|
5287
5545
|
name: stringType(),
|
5288
5546
|
schema: stringType(),
|
5289
|
-
columns: recordType(stringType(),
|
5547
|
+
columns: recordType(stringType(), column3),
|
5290
5548
|
indexes: recordType(stringType(), indexV5),
|
5291
|
-
foreignKeys: recordType(stringType(),
|
5292
|
-
compositePrimaryKeys: recordType(stringType(),
|
5293
|
-
uniqueConstraints: recordType(stringType(),
|
5549
|
+
foreignKeys: recordType(stringType(), fk3),
|
5550
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5551
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5294
5552
|
}).strict();
|
5295
5553
|
var tableV6 = objectType({
|
5296
5554
|
name: stringType(),
|
5297
5555
|
schema: stringType(),
|
5298
|
-
columns: recordType(stringType(),
|
5556
|
+
columns: recordType(stringType(), column3),
|
5299
5557
|
indexes: recordType(stringType(), indexV6),
|
5300
|
-
foreignKeys: recordType(stringType(),
|
5301
|
-
compositePrimaryKeys: recordType(stringType(),
|
5302
|
-
uniqueConstraints: recordType(stringType(),
|
5558
|
+
foreignKeys: recordType(stringType(), fk3),
|
5559
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5560
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5303
5561
|
}).strict();
|
5304
5562
|
var tableV7 = objectType({
|
5305
5563
|
name: stringType(),
|
5306
5564
|
schema: stringType(),
|
5307
5565
|
columns: recordType(stringType(), columnV7),
|
5308
|
-
indexes: recordType(stringType(),
|
5309
|
-
foreignKeys: recordType(stringType(),
|
5310
|
-
compositePrimaryKeys: recordType(stringType(),
|
5311
|
-
uniqueConstraints: recordType(stringType(),
|
5566
|
+
indexes: recordType(stringType(), index3),
|
5567
|
+
foreignKeys: recordType(stringType(), fk3),
|
5568
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5569
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
5312
5570
|
}).strict();
|
5313
|
-
var
|
5571
|
+
var table3 = objectType({
|
5314
5572
|
name: stringType(),
|
5315
5573
|
schema: stringType(),
|
5316
|
-
columns: recordType(stringType(),
|
5317
|
-
indexes: recordType(stringType(),
|
5318
|
-
foreignKeys: recordType(stringType(),
|
5319
|
-
compositePrimaryKeys: recordType(stringType(),
|
5320
|
-
uniqueConstraints: recordType(stringType(),
|
5321
|
-
policies: recordType(stringType(),
|
5322
|
-
checkConstraints: recordType(stringType(),
|
5574
|
+
columns: recordType(stringType(), column3),
|
5575
|
+
indexes: recordType(stringType(), index3),
|
5576
|
+
foreignKeys: recordType(stringType(), fk3),
|
5577
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
5578
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
|
5579
|
+
policies: recordType(stringType(), policy2).default({}),
|
5580
|
+
checkConstraints: recordType(stringType(), checkConstraint3).default({}),
|
5323
5581
|
isRLSEnabled: booleanType().default(false)
|
5324
5582
|
}).strict();
|
5325
|
-
var
|
5583
|
+
var schemaHash3 = objectType({
|
5326
5584
|
id: stringType(),
|
5327
5585
|
prevId: stringType()
|
5328
5586
|
});
|
5329
|
-
var
|
5587
|
+
var kitInternals3 = objectType({
|
5330
5588
|
tables: recordType(
|
5331
5589
|
stringType(),
|
5332
5590
|
objectType({
|
@@ -5346,46 +5604,46 @@ var pgSchemaInternalV3 = objectType({
|
|
5346
5604
|
version: literalType("3"),
|
5347
5605
|
dialect: literalType("pg"),
|
5348
5606
|
tables: recordType(stringType(), tableV32),
|
5349
|
-
enums: recordType(stringType(),
|
5607
|
+
enums: recordType(stringType(), enumSchemaV12)
|
5350
5608
|
}).strict();
|
5351
5609
|
var pgSchemaInternalV4 = objectType({
|
5352
5610
|
version: literalType("4"),
|
5353
5611
|
dialect: literalType("pg"),
|
5354
5612
|
tables: recordType(stringType(), tableV42),
|
5355
|
-
enums: recordType(stringType(),
|
5613
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5356
5614
|
schemas: recordType(stringType(), stringType())
|
5357
5615
|
}).strict();
|
5358
5616
|
var pgSchemaInternalV5 = objectType({
|
5359
5617
|
version: literalType("5"),
|
5360
5618
|
dialect: literalType("pg"),
|
5361
5619
|
tables: recordType(stringType(), tableV5),
|
5362
|
-
enums: recordType(stringType(),
|
5620
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5363
5621
|
schemas: recordType(stringType(), stringType()),
|
5364
5622
|
_meta: objectType({
|
5365
5623
|
schemas: recordType(stringType(), stringType()),
|
5366
5624
|
tables: recordType(stringType(), stringType()),
|
5367
5625
|
columns: recordType(stringType(), stringType())
|
5368
5626
|
}),
|
5369
|
-
internal:
|
5627
|
+
internal: kitInternals3
|
5370
5628
|
}).strict();
|
5371
5629
|
var pgSchemaInternalV6 = objectType({
|
5372
5630
|
version: literalType("6"),
|
5373
5631
|
dialect: literalType("postgresql"),
|
5374
5632
|
tables: recordType(stringType(), tableV6),
|
5375
|
-
enums: recordType(stringType(),
|
5633
|
+
enums: recordType(stringType(), enumSchema2),
|
5376
5634
|
schemas: recordType(stringType(), stringType()),
|
5377
5635
|
_meta: objectType({
|
5378
5636
|
schemas: recordType(stringType(), stringType()),
|
5379
5637
|
tables: recordType(stringType(), stringType()),
|
5380
5638
|
columns: recordType(stringType(), stringType())
|
5381
5639
|
}),
|
5382
|
-
internal:
|
5640
|
+
internal: kitInternals3
|
5383
5641
|
}).strict();
|
5384
5642
|
var pgSchemaExternal = objectType({
|
5385
5643
|
version: literalType("5"),
|
5386
5644
|
dialect: literalType("pg"),
|
5387
|
-
tables: arrayType(
|
5388
|
-
enums: arrayType(
|
5645
|
+
tables: arrayType(table3),
|
5646
|
+
enums: arrayType(enumSchemaV12),
|
5389
5647
|
schemas: arrayType(objectType({ name: stringType() })),
|
5390
5648
|
_meta: objectType({
|
5391
5649
|
schemas: recordType(stringType(), stringType()),
|
@@ -5397,37 +5655,37 @@ var pgSchemaInternalV7 = objectType({
|
|
5397
5655
|
version: literalType("7"),
|
5398
5656
|
dialect: literalType("postgresql"),
|
5399
5657
|
tables: recordType(stringType(), tableV7),
|
5400
|
-
enums: recordType(stringType(),
|
5658
|
+
enums: recordType(stringType(), enumSchema2),
|
5401
5659
|
schemas: recordType(stringType(), stringType()),
|
5402
|
-
sequences: recordType(stringType(),
|
5660
|
+
sequences: recordType(stringType(), sequenceSchema2),
|
5403
5661
|
_meta: objectType({
|
5404
5662
|
schemas: recordType(stringType(), stringType()),
|
5405
5663
|
tables: recordType(stringType(), stringType()),
|
5406
5664
|
columns: recordType(stringType(), stringType())
|
5407
5665
|
}),
|
5408
|
-
internal:
|
5666
|
+
internal: kitInternals3
|
5409
5667
|
}).strict();
|
5410
5668
|
var pgSchemaInternal = objectType({
|
5411
5669
|
version: literalType("7"),
|
5412
5670
|
dialect: literalType("postgresql"),
|
5413
|
-
tables: recordType(stringType(),
|
5414
|
-
enums: recordType(stringType(),
|
5671
|
+
tables: recordType(stringType(), table3),
|
5672
|
+
enums: recordType(stringType(), enumSchema2),
|
5415
5673
|
schemas: recordType(stringType(), stringType()),
|
5416
|
-
views: recordType(stringType(),
|
5417
|
-
sequences: recordType(stringType(),
|
5418
|
-
roles: recordType(stringType(),
|
5419
|
-
policies: recordType(stringType(),
|
5674
|
+
views: recordType(stringType(), view3).default({}),
|
5675
|
+
sequences: recordType(stringType(), sequenceSchema2).default({}),
|
5676
|
+
roles: recordType(stringType(), roleSchema2).default({}),
|
5677
|
+
policies: recordType(stringType(), policy2).default({}),
|
5420
5678
|
_meta: objectType({
|
5421
5679
|
schemas: recordType(stringType(), stringType()),
|
5422
5680
|
tables: recordType(stringType(), stringType()),
|
5423
5681
|
columns: recordType(stringType(), stringType())
|
5424
5682
|
}),
|
5425
|
-
internal:
|
5683
|
+
internal: kitInternals3
|
5426
5684
|
}).strict();
|
5427
|
-
var
|
5685
|
+
var tableSquashed3 = objectType({
|
5428
5686
|
name: stringType(),
|
5429
5687
|
schema: stringType(),
|
5430
|
-
columns: recordType(stringType(),
|
5688
|
+
columns: recordType(stringType(), columnSquashed2),
|
5431
5689
|
indexes: recordType(stringType(), stringType()),
|
5432
5690
|
foreignKeys: recordType(stringType(), stringType()),
|
5433
5691
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5439,7 +5697,7 @@ var tableSquashed2 = objectType({
|
|
5439
5697
|
var tableSquashedV42 = objectType({
|
5440
5698
|
name: stringType(),
|
5441
5699
|
schema: stringType(),
|
5442
|
-
columns: recordType(stringType(),
|
5700
|
+
columns: recordType(stringType(), column3),
|
5443
5701
|
indexes: recordType(stringType(), stringType()),
|
5444
5702
|
foreignKeys: recordType(stringType(), stringType())
|
5445
5703
|
}).strict();
|
@@ -5447,33 +5705,33 @@ var pgSchemaSquashedV4 = objectType({
|
|
5447
5705
|
version: literalType("4"),
|
5448
5706
|
dialect: literalType("pg"),
|
5449
5707
|
tables: recordType(stringType(), tableSquashedV42),
|
5450
|
-
enums: recordType(stringType(),
|
5708
|
+
enums: recordType(stringType(), enumSchemaV12),
|
5451
5709
|
schemas: recordType(stringType(), stringType())
|
5452
5710
|
}).strict();
|
5453
5711
|
var pgSchemaSquashedV6 = objectType({
|
5454
5712
|
version: literalType("6"),
|
5455
5713
|
dialect: literalType("postgresql"),
|
5456
|
-
tables: recordType(stringType(),
|
5457
|
-
enums: recordType(stringType(),
|
5714
|
+
tables: recordType(stringType(), tableSquashed3),
|
5715
|
+
enums: recordType(stringType(), enumSchema2),
|
5458
5716
|
schemas: recordType(stringType(), stringType())
|
5459
5717
|
}).strict();
|
5460
5718
|
var pgSchemaSquashed = objectType({
|
5461
5719
|
version: literalType("7"),
|
5462
5720
|
dialect: literalType("postgresql"),
|
5463
|
-
tables: recordType(stringType(),
|
5464
|
-
enums: recordType(stringType(),
|
5721
|
+
tables: recordType(stringType(), tableSquashed3),
|
5722
|
+
enums: recordType(stringType(), enumSchema2),
|
5465
5723
|
schemas: recordType(stringType(), stringType()),
|
5466
|
-
views: recordType(stringType(),
|
5467
|
-
sequences: recordType(stringType(),
|
5468
|
-
roles: recordType(stringType(),
|
5469
|
-
policies: recordType(stringType(),
|
5724
|
+
views: recordType(stringType(), view3),
|
5725
|
+
sequences: recordType(stringType(), sequenceSquashed2),
|
5726
|
+
roles: recordType(stringType(), roleSchema2).default({}),
|
5727
|
+
policies: recordType(stringType(), policySquashed2).default({})
|
5470
5728
|
}).strict();
|
5471
|
-
var pgSchemaV3 = pgSchemaInternalV3.merge(
|
5472
|
-
var pgSchemaV4 = pgSchemaInternalV4.merge(
|
5473
|
-
var pgSchemaV5 = pgSchemaInternalV5.merge(
|
5474
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(
|
5475
|
-
var pgSchemaV7 = pgSchemaInternalV7.merge(
|
5476
|
-
var pgSchema = pgSchemaInternal.merge(
|
5729
|
+
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash3);
|
5730
|
+
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash3);
|
5731
|
+
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash3);
|
5732
|
+
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash3);
|
5733
|
+
var pgSchemaV7 = pgSchemaInternalV7.merge(schemaHash3);
|
5734
|
+
var pgSchema = pgSchemaInternal.merge(schemaHash3);
|
5477
5735
|
var backwardCompatiblePgSchema = unionType([
|
5478
5736
|
pgSchemaV5,
|
5479
5737
|
pgSchemaV6,
|
@@ -5498,7 +5756,7 @@ var dryPg = pgSchema.parse({
|
|
5498
5756
|
});
|
5499
5757
|
|
5500
5758
|
// src/serializer/singlestoreSchema.ts
|
5501
|
-
var
|
5759
|
+
var index4 = objectType({
|
5502
5760
|
name: stringType(),
|
5503
5761
|
columns: stringType().array(),
|
5504
5762
|
isUnique: booleanType(),
|
@@ -5506,7 +5764,7 @@ var index3 = objectType({
|
|
5506
5764
|
algorithm: enumType(["default", "inplace", "copy"]).optional(),
|
5507
5765
|
lock: enumType(["default", "none", "shared", "exclusive"]).optional()
|
5508
5766
|
}).strict();
|
5509
|
-
var
|
5767
|
+
var column4 = objectType({
|
5510
5768
|
name: stringType(),
|
5511
5769
|
type: stringType(),
|
5512
5770
|
primaryKey: booleanType(),
|
@@ -5519,27 +5777,27 @@ var column3 = objectType({
|
|
5519
5777
|
as: stringType()
|
5520
5778
|
}).optional()
|
5521
5779
|
}).strict();
|
5522
|
-
var
|
5780
|
+
var compositePK4 = objectType({
|
5523
5781
|
name: stringType(),
|
5524
5782
|
columns: stringType().array()
|
5525
5783
|
}).strict();
|
5526
|
-
var
|
5784
|
+
var uniqueConstraint4 = objectType({
|
5527
5785
|
name: stringType(),
|
5528
5786
|
columns: stringType().array()
|
5529
5787
|
}).strict();
|
5530
|
-
var
|
5788
|
+
var table4 = objectType({
|
5531
5789
|
name: stringType(),
|
5532
|
-
columns: recordType(stringType(),
|
5533
|
-
indexes: recordType(stringType(),
|
5534
|
-
compositePrimaryKeys: recordType(stringType(),
|
5535
|
-
uniqueConstraints: recordType(stringType(),
|
5790
|
+
columns: recordType(stringType(), column4),
|
5791
|
+
indexes: recordType(stringType(), index4),
|
5792
|
+
compositePrimaryKeys: recordType(stringType(), compositePK4),
|
5793
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint4).default({})
|
5536
5794
|
}).strict();
|
5537
5795
|
var viewMeta2 = objectType({
|
5538
5796
|
algorithm: enumType(["undefined", "merge", "temptable"]),
|
5539
5797
|
sqlSecurity: enumType(["definer", "invoker"]),
|
5540
5798
|
withCheckOption: enumType(["local", "cascaded"]).optional()
|
5541
5799
|
}).strict();
|
5542
|
-
var
|
5800
|
+
var kitInternals4 = objectType({
|
5543
5801
|
tables: recordType(
|
5544
5802
|
stringType(),
|
5545
5803
|
objectType({
|
@@ -5560,25 +5818,25 @@ var kitInternals3 = objectType({
|
|
5560
5818
|
).optional()
|
5561
5819
|
}).optional();
|
5562
5820
|
var dialect2 = literalType("singlestore");
|
5563
|
-
var
|
5821
|
+
var schemaHash4 = objectType({
|
5564
5822
|
id: stringType(),
|
5565
5823
|
prevId: stringType()
|
5566
5824
|
});
|
5567
5825
|
var schemaInternal2 = objectType({
|
5568
5826
|
version: literalType("1"),
|
5569
5827
|
dialect: dialect2,
|
5570
|
-
tables: recordType(stringType(),
|
5828
|
+
tables: recordType(stringType(), table4),
|
5571
5829
|
/* views: record(string(), view).default({}), */
|
5572
5830
|
_meta: objectType({
|
5573
5831
|
tables: recordType(stringType(), stringType()),
|
5574
5832
|
columns: recordType(stringType(), stringType())
|
5575
5833
|
}),
|
5576
|
-
internal:
|
5834
|
+
internal: kitInternals4
|
5577
5835
|
}).strict();
|
5578
|
-
var schema2 = schemaInternal2.merge(
|
5579
|
-
var
|
5836
|
+
var schema2 = schemaInternal2.merge(schemaHash4);
|
5837
|
+
var tableSquashed4 = objectType({
|
5580
5838
|
name: stringType(),
|
5581
|
-
columns: recordType(stringType(),
|
5839
|
+
columns: recordType(stringType(), column4),
|
5582
5840
|
indexes: recordType(stringType(), stringType()),
|
5583
5841
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5584
5842
|
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
@@ -5586,7 +5844,7 @@ var tableSquashed3 = objectType({
|
|
5586
5844
|
var schemaSquashed2 = objectType({
|
5587
5845
|
version: literalType("1"),
|
5588
5846
|
dialect: dialect2,
|
5589
|
-
tables: recordType(stringType(),
|
5847
|
+
tables: recordType(stringType(), tableSquashed4)
|
5590
5848
|
/* views: record(string(), viewSquashed), */
|
5591
5849
|
}).strict();
|
5592
5850
|
var singlestoreSchema = schema2;
|
@@ -5607,13 +5865,13 @@ var drySingleStore = singlestoreSchema.parse({
|
|
5607
5865
|
});
|
5608
5866
|
|
5609
5867
|
// src/serializer/sqliteSchema.ts
|
5610
|
-
var
|
5868
|
+
var index5 = objectType({
|
5611
5869
|
name: stringType(),
|
5612
5870
|
columns: stringType().array(),
|
5613
5871
|
where: stringType().optional(),
|
5614
5872
|
isUnique: booleanType()
|
5615
5873
|
}).strict();
|
5616
|
-
var
|
5874
|
+
var fk4 = objectType({
|
5617
5875
|
name: stringType(),
|
5618
5876
|
tableFrom: stringType(),
|
5619
5877
|
columnsFrom: stringType().array(),
|
@@ -5622,11 +5880,11 @@ var fk3 = objectType({
|
|
5622
5880
|
onUpdate: stringType().optional(),
|
5623
5881
|
onDelete: stringType().optional()
|
5624
5882
|
}).strict();
|
5625
|
-
var
|
5883
|
+
var compositePK5 = objectType({
|
5626
5884
|
columns: stringType().array(),
|
5627
5885
|
name: stringType().optional()
|
5628
5886
|
}).strict();
|
5629
|
-
var
|
5887
|
+
var column5 = objectType({
|
5630
5888
|
name: stringType(),
|
5631
5889
|
type: stringType(),
|
5632
5890
|
primaryKey: booleanType(),
|
@@ -5640,35 +5898,35 @@ var column4 = objectType({
|
|
5640
5898
|
}).strict();
|
5641
5899
|
var tableV33 = objectType({
|
5642
5900
|
name: stringType(),
|
5643
|
-
columns: recordType(stringType(),
|
5644
|
-
indexes: recordType(stringType(),
|
5645
|
-
foreignKeys: recordType(stringType(),
|
5901
|
+
columns: recordType(stringType(), column5),
|
5902
|
+
indexes: recordType(stringType(), index5),
|
5903
|
+
foreignKeys: recordType(stringType(), fk4)
|
5646
5904
|
}).strict();
|
5647
|
-
var
|
5905
|
+
var uniqueConstraint5 = objectType({
|
5648
5906
|
name: stringType(),
|
5649
5907
|
columns: stringType().array()
|
5650
5908
|
}).strict();
|
5651
|
-
var
|
5909
|
+
var checkConstraint4 = objectType({
|
5652
5910
|
name: stringType(),
|
5653
5911
|
value: stringType()
|
5654
5912
|
}).strict();
|
5655
|
-
var
|
5913
|
+
var table5 = objectType({
|
5656
5914
|
name: stringType(),
|
5657
|
-
columns: recordType(stringType(),
|
5658
|
-
indexes: recordType(stringType(),
|
5659
|
-
foreignKeys: recordType(stringType(),
|
5660
|
-
compositePrimaryKeys: recordType(stringType(),
|
5661
|
-
uniqueConstraints: recordType(stringType(),
|
5662
|
-
checkConstraints: recordType(stringType(),
|
5915
|
+
columns: recordType(stringType(), column5),
|
5916
|
+
indexes: recordType(stringType(), index5),
|
5917
|
+
foreignKeys: recordType(stringType(), fk4),
|
5918
|
+
compositePrimaryKeys: recordType(stringType(), compositePK5),
|
5919
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint5).default({}),
|
5920
|
+
checkConstraints: recordType(stringType(), checkConstraint4).default({})
|
5663
5921
|
}).strict();
|
5664
|
-
var
|
5922
|
+
var view4 = objectType({
|
5665
5923
|
name: stringType(),
|
5666
|
-
columns: recordType(stringType(),
|
5924
|
+
columns: recordType(stringType(), column5),
|
5667
5925
|
definition: stringType().optional(),
|
5668
5926
|
isExisting: booleanType()
|
5669
5927
|
}).strict();
|
5670
5928
|
var dialect3 = enumType(["sqlite"]);
|
5671
|
-
var
|
5929
|
+
var schemaHash5 = objectType({
|
5672
5930
|
id: stringType(),
|
5673
5931
|
prevId: stringType()
|
5674
5932
|
}).strict();
|
@@ -5681,21 +5939,21 @@ var schemaInternalV32 = objectType({
|
|
5681
5939
|
var schemaInternalV42 = objectType({
|
5682
5940
|
version: literalType("4"),
|
5683
5941
|
dialect: dialect3,
|
5684
|
-
tables: recordType(stringType(),
|
5685
|
-
views: recordType(stringType(),
|
5942
|
+
tables: recordType(stringType(), table5),
|
5943
|
+
views: recordType(stringType(), view4).default({}),
|
5686
5944
|
enums: objectType({})
|
5687
5945
|
}).strict();
|
5688
5946
|
var schemaInternalV52 = objectType({
|
5689
5947
|
version: literalType("5"),
|
5690
5948
|
dialect: dialect3,
|
5691
|
-
tables: recordType(stringType(),
|
5949
|
+
tables: recordType(stringType(), table5),
|
5692
5950
|
enums: objectType({}),
|
5693
5951
|
_meta: objectType({
|
5694
5952
|
tables: recordType(stringType(), stringType()),
|
5695
5953
|
columns: recordType(stringType(), stringType())
|
5696
5954
|
})
|
5697
5955
|
}).strict();
|
5698
|
-
var
|
5956
|
+
var kitInternals5 = objectType({
|
5699
5957
|
indexes: recordType(
|
5700
5958
|
stringType(),
|
5701
5959
|
objectType({
|
@@ -5710,22 +5968,22 @@ var latestVersion = literalType("6");
|
|
5710
5968
|
var schemaInternal3 = objectType({
|
5711
5969
|
version: latestVersion,
|
5712
5970
|
dialect: dialect3,
|
5713
|
-
tables: recordType(stringType(),
|
5714
|
-
views: recordType(stringType(),
|
5971
|
+
tables: recordType(stringType(), table5),
|
5972
|
+
views: recordType(stringType(), view4).default({}),
|
5715
5973
|
enums: objectType({}),
|
5716
5974
|
_meta: objectType({
|
5717
5975
|
tables: recordType(stringType(), stringType()),
|
5718
5976
|
columns: recordType(stringType(), stringType())
|
5719
5977
|
}),
|
5720
|
-
internal:
|
5978
|
+
internal: kitInternals5
|
5721
5979
|
}).strict();
|
5722
|
-
var schemaV32 = schemaInternalV32.merge(
|
5723
|
-
var schemaV42 = schemaInternalV42.merge(
|
5724
|
-
var schemaV52 = schemaInternalV52.merge(
|
5725
|
-
var schema3 = schemaInternal3.merge(
|
5726
|
-
var
|
5980
|
+
var schemaV32 = schemaInternalV32.merge(schemaHash5).strict();
|
5981
|
+
var schemaV42 = schemaInternalV42.merge(schemaHash5).strict();
|
5982
|
+
var schemaV52 = schemaInternalV52.merge(schemaHash5).strict();
|
5983
|
+
var schema3 = schemaInternal3.merge(schemaHash5).strict();
|
5984
|
+
var tableSquashed5 = objectType({
|
5727
5985
|
name: stringType(),
|
5728
|
-
columns: recordType(stringType(),
|
5986
|
+
columns: recordType(stringType(), column5),
|
5729
5987
|
indexes: recordType(stringType(), stringType()),
|
5730
5988
|
foreignKeys: recordType(stringType(), stringType()),
|
5731
5989
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5735,8 +5993,8 @@ var tableSquashed4 = objectType({
|
|
5735
5993
|
var schemaSquashed3 = objectType({
|
5736
5994
|
version: latestVersion,
|
5737
5995
|
dialect: dialect3,
|
5738
|
-
tables: recordType(stringType(),
|
5739
|
-
views: recordType(stringType(),
|
5996
|
+
tables: recordType(stringType(), tableSquashed5),
|
5997
|
+
views: recordType(stringType(), view4),
|
5740
5998
|
enums: anyType()
|
5741
5999
|
}).strict();
|
5742
6000
|
var drySQLite = schema3.parse({
|
@@ -5808,6 +6066,8 @@ var validatorForDialect = (dialect4) => {
|
|
5808
6066
|
return { validator: backwardCompatibleMysqlSchema, version: 5 };
|
5809
6067
|
case "singlestore":
|
5810
6068
|
return { validator: backwardCompatibleSingleStoreSchema, version: 1 };
|
6069
|
+
case "gel":
|
6070
|
+
return { validator: backwardCompatibleGelSchema, version: 1 };
|
5811
6071
|
}
|
5812
6072
|
};
|
5813
6073
|
var validateWithReport = (snapshots, dialect4) => {
|
@@ -5917,8 +6177,8 @@ var tableRenameKey = (it) => {
|
|
5917
6177
|
const out = it.schema ? `"${it.schema}"."${it.name}"` : `"${it.name}"`;
|
5918
6178
|
return out;
|
5919
6179
|
};
|
5920
|
-
var columnRenameKey = (
|
5921
|
-
const out = schema4 ? `"${schema4}"."${
|
6180
|
+
var columnRenameKey = (table6, schema4, column6) => {
|
6181
|
+
const out = schema4 ? `"${schema4}"."${table6}"."${column6}"` : `"${table6}"."${column6}"`;
|
5922
6182
|
return out;
|
5923
6183
|
};
|
5924
6184
|
var kloudMeta = () => {
|