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