drizzle-kit 0.20.17-c347d7b → 0.20.17-c50cacb
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/bin.cjs +8046 -1215
- package/index.d.mts +25 -13
- package/index.d.ts +25 -13
- package/package.json +5 -16
- package/payload.d.mts +987 -18
- package/payload.d.ts +987 -18
- package/payload.js +19076 -16849
- package/payload.mjs +19093 -16841
- package/utils-studio.js +9 -6
- package/utils-studio.mjs +9 -6
- package/utils.js +8 -5
- package/utils.mjs +8 -5
- package/@types/utils.d.ts +0 -13
- package/cli/commands/migrate.d.ts +0 -287
- package/cli/commands/mysqlIntrospect.d.ts +0 -50
- package/cli/commands/mysqlPushUtils.d.ts +0 -14
- package/cli/commands/pgIntrospect.d.ts +0 -59
- package/cli/commands/pgPushUtils.d.ts +0 -11
- package/cli/commands/sqliteIntrospect.d.ts +0 -103
- package/cli/commands/sqlitePushUtils.d.ts +0 -15
- package/cli/commands/utils.d.ts +0 -180
- package/cli/connections.d.ts +0 -18
- package/cli/selector-ui.d.ts +0 -13
- package/cli/utils.d.ts +0 -13
- package/cli/validations/cli.d.ts +0 -169
- package/cli/validations/common.d.ts +0 -214
- package/cli/validations/mysql.d.ts +0 -29
- package/cli/validations/outputs.d.ts +0 -41
- package/cli/validations/pg.d.ts +0 -46
- package/cli/validations/sqlite.d.ts +0 -22
- package/cli/validations/studio.d.ts +0 -92
- package/cli/views.d.ts +0 -70
- package/global.d.ts +0 -6
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -61
- package/jsonStatements.d.ts +0 -376
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1316
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -7
- package/serializer/mysqlSchema.d.ts +0 -4650
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4792
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -7
- package/serializer/sqliteSchema.d.ts +0 -2801
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/serializer/studio.d.ts +0 -53
- package/snapshotsDiffer.d.ts +0 -3936
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -4
- package/utils-studio.d.ts +0 -4
- package/utils.d.ts +0 -78
package/utils-studio.js
CHANGED
@@ -573,7 +573,7 @@ var init_global = __esm({
|
|
573
573
|
}
|
574
574
|
});
|
575
575
|
|
576
|
-
// node_modules/.pnpm/zod@3.23.
|
576
|
+
// node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
|
577
577
|
function getErrorMap() {
|
578
578
|
return overrideErrorMap;
|
579
579
|
}
|
@@ -744,7 +744,7 @@ function createZodEnum(values, params) {
|
|
744
744
|
}
|
745
745
|
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
746
746
|
var init_lib = __esm({
|
747
|
-
"node_modules/.pnpm/zod@3.23.
|
747
|
+
"node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs"() {
|
748
748
|
(function(util2) {
|
749
749
|
util2.assertEqual = (val) => val;
|
750
750
|
function assertIs(_arg) {
|
@@ -4240,10 +4240,13 @@ var init_lib = __esm({
|
|
4240
4240
|
ZodReadonly = class extends ZodType {
|
4241
4241
|
_parse(input) {
|
4242
4242
|
const result = this._def.innerType._parse(input);
|
4243
|
-
|
4244
|
-
|
4245
|
-
|
4246
|
-
|
4243
|
+
const freeze = (data) => {
|
4244
|
+
if (isValid(data)) {
|
4245
|
+
data.value = Object.freeze(data.value);
|
4246
|
+
}
|
4247
|
+
return data;
|
4248
|
+
};
|
4249
|
+
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
|
4247
4250
|
}
|
4248
4251
|
unwrap() {
|
4249
4252
|
return this._def.innerType;
|
package/utils-studio.mjs
CHANGED
@@ -574,7 +574,7 @@ var init_global = __esm({
|
|
574
574
|
}
|
575
575
|
});
|
576
576
|
|
577
|
-
// node_modules/.pnpm/zod@3.23.
|
577
|
+
// node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
|
578
578
|
function getErrorMap() {
|
579
579
|
return overrideErrorMap;
|
580
580
|
}
|
@@ -745,7 +745,7 @@ function createZodEnum(values, params) {
|
|
745
745
|
}
|
746
746
|
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
747
747
|
var init_lib = __esm({
|
748
|
-
"node_modules/.pnpm/zod@3.23.
|
748
|
+
"node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs"() {
|
749
749
|
(function(util2) {
|
750
750
|
util2.assertEqual = (val) => val;
|
751
751
|
function assertIs(_arg) {
|
@@ -4241,10 +4241,13 @@ var init_lib = __esm({
|
|
4241
4241
|
ZodReadonly = class extends ZodType {
|
4242
4242
|
_parse(input) {
|
4243
4243
|
const result = this._def.innerType._parse(input);
|
4244
|
-
|
4245
|
-
|
4246
|
-
|
4247
|
-
|
4244
|
+
const freeze = (data) => {
|
4245
|
+
if (isValid(data)) {
|
4246
|
+
data.value = Object.freeze(data.value);
|
4247
|
+
}
|
4248
|
+
return data;
|
4249
|
+
};
|
4250
|
+
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
|
4248
4251
|
}
|
4249
4252
|
unwrap() {
|
4250
4253
|
return this._def.innerType;
|
package/utils.js
CHANGED
@@ -1079,7 +1079,7 @@ var info = (msg, greyMsg = "") => {
|
|
1079
1079
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1080
1080
|
var snapshotVersion = "6";
|
1081
1081
|
|
1082
|
-
// node_modules/.pnpm/zod@3.23.
|
1082
|
+
// node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
|
1083
1083
|
var util;
|
1084
1084
|
(function(util2) {
|
1085
1085
|
util2.assertEqual = (val) => val;
|
@@ -4749,10 +4749,13 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
|
|
4749
4749
|
var ZodReadonly = class extends ZodType {
|
4750
4750
|
_parse(input) {
|
4751
4751
|
const result = this._def.innerType._parse(input);
|
4752
|
-
|
4753
|
-
|
4754
|
-
|
4755
|
-
|
4752
|
+
const freeze = (data) => {
|
4753
|
+
if (isValid(data)) {
|
4754
|
+
data.value = Object.freeze(data.value);
|
4755
|
+
}
|
4756
|
+
return data;
|
4757
|
+
};
|
4758
|
+
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
|
4756
4759
|
}
|
4757
4760
|
unwrap() {
|
4758
4761
|
return this._def.innerType;
|
package/utils.mjs
CHANGED
@@ -1070,7 +1070,7 @@ var info = (msg, greyMsg = "") => {
|
|
1070
1070
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1071
1071
|
var snapshotVersion = "6";
|
1072
1072
|
|
1073
|
-
// node_modules/.pnpm/zod@3.23.
|
1073
|
+
// node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
|
1074
1074
|
var util;
|
1075
1075
|
(function(util2) {
|
1076
1076
|
util2.assertEqual = (val) => val;
|
@@ -4740,10 +4740,13 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
|
|
4740
4740
|
var ZodReadonly = class extends ZodType {
|
4741
4741
|
_parse(input) {
|
4742
4742
|
const result = this._def.innerType._parse(input);
|
4743
|
-
|
4744
|
-
|
4745
|
-
|
4746
|
-
|
4743
|
+
const freeze = (data) => {
|
4744
|
+
if (isValid(data)) {
|
4745
|
+
data.value = Object.freeze(data.value);
|
4746
|
+
}
|
4747
|
+
return data;
|
4748
|
+
};
|
4749
|
+
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
|
4747
4750
|
}
|
4748
4751
|
unwrap() {
|
4749
4752
|
return this._def.innerType;
|
package/@types/utils.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
declare global {
|
2
|
-
interface String {
|
3
|
-
trimChar(char: string): string;
|
4
|
-
squashSpaces(): string;
|
5
|
-
capitalise(): string;
|
6
|
-
camelCase(): string;
|
7
|
-
concatIf(it: string, condition: boolean): string;
|
8
|
-
}
|
9
|
-
interface Array<T> {
|
10
|
-
random(): T;
|
11
|
-
}
|
12
|
-
}
|
13
|
-
export {};
|
@@ -1,287 +0,0 @@
|
|
1
|
-
import { Column, ColumnsResolverInput, ColumnsResolverOutput, Enum, ResolverInput, ResolverOutput, ResolverOutputWithMoved, Table } from "../../snapshotsDiffer";
|
2
|
-
import type { CommonSchema } from "../../schemaValidator";
|
3
|
-
import { PgSchema } from "../../serializer/pgSchema";
|
4
|
-
import { SQLiteSchema } from "../../serializer/sqliteSchema";
|
5
|
-
import { MySqlSchema } from "../../serializer/mysqlSchema";
|
6
|
-
import { Journal } from "../../utils";
|
7
|
-
import { GenerateConfig } from "./utils";
|
8
|
-
export type Named = {
|
9
|
-
name: string;
|
10
|
-
};
|
11
|
-
export type NamedWithSchema = {
|
12
|
-
name: string;
|
13
|
-
schema: string;
|
14
|
-
};
|
15
|
-
export declare const schemasResolver: (input: ResolverInput<Table>) => Promise<ResolverOutput<Table>>;
|
16
|
-
export declare const tablesResolver: (input: ResolverInput<Table>) => Promise<ResolverOutputWithMoved<Table>>;
|
17
|
-
export declare const enumsResolver: (input: ResolverInput<Enum>) => Promise<ResolverOutputWithMoved<Enum>>;
|
18
|
-
export declare const columnsResolver: (input: ColumnsResolverInput<Column>) => Promise<ColumnsResolverOutput<Column>>;
|
19
|
-
export declare const prepareAndMigratePg: (config: GenerateConfig) => Promise<void>;
|
20
|
-
export declare const preparePgPush: (schemaPath: string | string[], snapshot: PgSchema, schemaFilter: string[]) => Promise<{
|
21
|
-
sqlStatements: string[];
|
22
|
-
statements: import("../../jsonStatements").JsonStatement[];
|
23
|
-
squashedPrev: {
|
24
|
-
tables: Record<string, {
|
25
|
-
name: string;
|
26
|
-
columns: Record<string, {
|
27
|
-
name: string;
|
28
|
-
type: string;
|
29
|
-
primaryKey: boolean;
|
30
|
-
notNull: boolean;
|
31
|
-
isUnique?: any;
|
32
|
-
default?: any;
|
33
|
-
typeSchema?: string | undefined;
|
34
|
-
uniqueName?: string | undefined;
|
35
|
-
nullsNotDistinct?: boolean | undefined;
|
36
|
-
}>;
|
37
|
-
indexes: Record<string, string>;
|
38
|
-
foreignKeys: Record<string, string>;
|
39
|
-
schema: string;
|
40
|
-
compositePrimaryKeys: Record<string, string>;
|
41
|
-
uniqueConstraints: Record<string, string>;
|
42
|
-
}>;
|
43
|
-
version: "6";
|
44
|
-
dialect: "postgresql";
|
45
|
-
schemas: Record<string, string>;
|
46
|
-
enums: Record<string, {
|
47
|
-
name: string;
|
48
|
-
values: string[];
|
49
|
-
schema: string;
|
50
|
-
}>;
|
51
|
-
};
|
52
|
-
squashedCur: {
|
53
|
-
tables: Record<string, {
|
54
|
-
name: string;
|
55
|
-
columns: Record<string, {
|
56
|
-
name: string;
|
57
|
-
type: string;
|
58
|
-
primaryKey: boolean;
|
59
|
-
notNull: boolean;
|
60
|
-
isUnique?: any;
|
61
|
-
default?: any;
|
62
|
-
typeSchema?: string | undefined;
|
63
|
-
uniqueName?: string | undefined;
|
64
|
-
nullsNotDistinct?: boolean | undefined;
|
65
|
-
}>;
|
66
|
-
indexes: Record<string, string>;
|
67
|
-
foreignKeys: Record<string, string>;
|
68
|
-
schema: string;
|
69
|
-
compositePrimaryKeys: Record<string, string>;
|
70
|
-
uniqueConstraints: Record<string, string>;
|
71
|
-
}>;
|
72
|
-
version: "6";
|
73
|
-
dialect: "postgresql";
|
74
|
-
schemas: Record<string, string>;
|
75
|
-
enums: Record<string, {
|
76
|
-
name: string;
|
77
|
-
values: string[];
|
78
|
-
schema: string;
|
79
|
-
}>;
|
80
|
-
};
|
81
|
-
}>;
|
82
|
-
export declare const prepareMySQLPush: (schemaPath: string | string[], snapshot: MySqlSchema) => Promise<{
|
83
|
-
sqlStatements: string[];
|
84
|
-
statements: import("../../jsonStatements").JsonStatement[];
|
85
|
-
validatedCur: {
|
86
|
-
tables: Record<string, {
|
87
|
-
name: string;
|
88
|
-
columns: Record<string, {
|
89
|
-
name: string;
|
90
|
-
type: string;
|
91
|
-
primaryKey: boolean;
|
92
|
-
notNull: boolean;
|
93
|
-
default?: any;
|
94
|
-
onUpdate?: any;
|
95
|
-
autoincrement?: boolean | undefined;
|
96
|
-
}>;
|
97
|
-
indexes: Record<string, {
|
98
|
-
name: string;
|
99
|
-
columns: string[];
|
100
|
-
isUnique: boolean;
|
101
|
-
using?: "btree" | "hash" | undefined;
|
102
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
103
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
104
|
-
}>;
|
105
|
-
foreignKeys: Record<string, {
|
106
|
-
name: string;
|
107
|
-
tableFrom: string;
|
108
|
-
columnsFrom: string[];
|
109
|
-
tableTo: string;
|
110
|
-
columnsTo: string[];
|
111
|
-
onUpdate?: string | undefined;
|
112
|
-
onDelete?: string | undefined;
|
113
|
-
}>;
|
114
|
-
compositePrimaryKeys: Record<string, {
|
115
|
-
name: string;
|
116
|
-
columns: string[];
|
117
|
-
}>;
|
118
|
-
uniqueConstraints: Record<string, {
|
119
|
-
name: string;
|
120
|
-
columns: string[];
|
121
|
-
}>;
|
122
|
-
}>;
|
123
|
-
id: string;
|
124
|
-
prevId: string;
|
125
|
-
version: "5";
|
126
|
-
dialect: "mysql";
|
127
|
-
_meta: {
|
128
|
-
columns: Record<string, string>;
|
129
|
-
tables: Record<string, string>;
|
130
|
-
};
|
131
|
-
internal?: {
|
132
|
-
tables: Record<string, {
|
133
|
-
columns: Record<string, {
|
134
|
-
isDefaultAnExpression?: boolean | undefined;
|
135
|
-
} | undefined>;
|
136
|
-
} | undefined>;
|
137
|
-
} | undefined;
|
138
|
-
};
|
139
|
-
validatedPrev: {
|
140
|
-
tables: Record<string, {
|
141
|
-
name: string;
|
142
|
-
columns: Record<string, {
|
143
|
-
name: string;
|
144
|
-
type: string;
|
145
|
-
primaryKey: boolean;
|
146
|
-
notNull: boolean;
|
147
|
-
default?: any;
|
148
|
-
onUpdate?: any;
|
149
|
-
autoincrement?: boolean | undefined;
|
150
|
-
}>;
|
151
|
-
indexes: Record<string, {
|
152
|
-
name: string;
|
153
|
-
columns: string[];
|
154
|
-
isUnique: boolean;
|
155
|
-
using?: "btree" | "hash" | undefined;
|
156
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
157
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
158
|
-
}>;
|
159
|
-
foreignKeys: Record<string, {
|
160
|
-
name: string;
|
161
|
-
tableFrom: string;
|
162
|
-
columnsFrom: string[];
|
163
|
-
tableTo: string;
|
164
|
-
columnsTo: string[];
|
165
|
-
onUpdate?: string | undefined;
|
166
|
-
onDelete?: string | undefined;
|
167
|
-
}>;
|
168
|
-
compositePrimaryKeys: Record<string, {
|
169
|
-
name: string;
|
170
|
-
columns: string[];
|
171
|
-
}>;
|
172
|
-
uniqueConstraints: Record<string, {
|
173
|
-
name: string;
|
174
|
-
columns: string[];
|
175
|
-
}>;
|
176
|
-
}>;
|
177
|
-
id: string;
|
178
|
-
prevId: string;
|
179
|
-
version: "5";
|
180
|
-
dialect: "mysql";
|
181
|
-
_meta: {
|
182
|
-
columns: Record<string, string>;
|
183
|
-
tables: Record<string, string>;
|
184
|
-
};
|
185
|
-
internal?: {
|
186
|
-
tables: Record<string, {
|
187
|
-
columns: Record<string, {
|
188
|
-
isDefaultAnExpression?: boolean | undefined;
|
189
|
-
} | undefined>;
|
190
|
-
} | undefined>;
|
191
|
-
} | undefined;
|
192
|
-
};
|
193
|
-
}>;
|
194
|
-
export declare const prepareAndMigrateMysql: (config: GenerateConfig) => Promise<void>;
|
195
|
-
export declare const prepareAndMigrateSqlite: (config: GenerateConfig) => Promise<void>;
|
196
|
-
export declare const prepareSQLitePush: (schemaPath: string | string[], snapshot: SQLiteSchema) => Promise<{
|
197
|
-
sqlStatements: string[];
|
198
|
-
statements: import("../../jsonStatements").JsonStatement[];
|
199
|
-
squashedPrev: {
|
200
|
-
tables: Record<string, {
|
201
|
-
name: string;
|
202
|
-
columns: Record<string, {
|
203
|
-
name: string;
|
204
|
-
type: string;
|
205
|
-
primaryKey: boolean;
|
206
|
-
notNull: boolean;
|
207
|
-
default?: any;
|
208
|
-
autoincrement?: boolean | undefined;
|
209
|
-
}>;
|
210
|
-
indexes: Record<string, string>;
|
211
|
-
foreignKeys: Record<string, string>;
|
212
|
-
compositePrimaryKeys: Record<string, string>;
|
213
|
-
uniqueConstraints: Record<string, string>;
|
214
|
-
}>;
|
215
|
-
version: "5";
|
216
|
-
dialect: "sqlite";
|
217
|
-
enums?: any;
|
218
|
-
};
|
219
|
-
squashedCur: {
|
220
|
-
tables: Record<string, {
|
221
|
-
name: string;
|
222
|
-
columns: Record<string, {
|
223
|
-
name: string;
|
224
|
-
type: string;
|
225
|
-
primaryKey: boolean;
|
226
|
-
notNull: boolean;
|
227
|
-
default?: any;
|
228
|
-
autoincrement?: boolean | undefined;
|
229
|
-
}>;
|
230
|
-
indexes: Record<string, string>;
|
231
|
-
foreignKeys: Record<string, string>;
|
232
|
-
compositePrimaryKeys: Record<string, string>;
|
233
|
-
uniqueConstraints: Record<string, string>;
|
234
|
-
}>;
|
235
|
-
version: "5";
|
236
|
-
dialect: "sqlite";
|
237
|
-
enums?: any;
|
238
|
-
};
|
239
|
-
meta: {
|
240
|
-
schemas: {};
|
241
|
-
tables: {};
|
242
|
-
columns: {};
|
243
|
-
} | undefined;
|
244
|
-
}>;
|
245
|
-
export declare const promptColumnsConflicts: <T extends Named>(tableName: string, newColumns: T[], missingColumns: T[]) => Promise<{
|
246
|
-
created: T[];
|
247
|
-
renamed: {
|
248
|
-
from: T;
|
249
|
-
to: T;
|
250
|
-
}[];
|
251
|
-
deleted: T[];
|
252
|
-
}>;
|
253
|
-
export declare const promptNamedWithSchemasConflict: <T extends NamedWithSchema>(newItems: T[], missingItems: T[], entity: "table" | "enum") => Promise<{
|
254
|
-
created: T[];
|
255
|
-
renamed: {
|
256
|
-
from: T;
|
257
|
-
to: T;
|
258
|
-
}[];
|
259
|
-
moved: {
|
260
|
-
name: string;
|
261
|
-
schemaFrom: string;
|
262
|
-
schemaTo: string;
|
263
|
-
}[];
|
264
|
-
deleted: T[];
|
265
|
-
}>;
|
266
|
-
export declare const promptSchemasConflict: <T extends Named>(newSchemas: T[], missingSchemas: T[]) => Promise<{
|
267
|
-
created: T[];
|
268
|
-
renamed: {
|
269
|
-
from: T;
|
270
|
-
to: T;
|
271
|
-
}[];
|
272
|
-
deleted: T[];
|
273
|
-
}>;
|
274
|
-
export declare const BREAKPOINT = "--> statement-breakpoint\n";
|
275
|
-
export declare const writeResult: ({ cur, sqlStatements, journal, _meta, outFolder, breakpoints, name, bundle, type, }: {
|
276
|
-
cur: CommonSchema;
|
277
|
-
sqlStatements: string[];
|
278
|
-
journal: Journal;
|
279
|
-
_meta?: any;
|
280
|
-
outFolder: string;
|
281
|
-
breakpoints: boolean;
|
282
|
-
name?: string;
|
283
|
-
bundle?: boolean;
|
284
|
-
type?: "introspect" | "custom" | "none";
|
285
|
-
}) => void;
|
286
|
-
export declare const embeddedMigrations: (journal: Journal) => string;
|
287
|
-
export declare const prepareSnapshotFolderName: () => string;
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import type { DB } from "../../utils";
|
2
|
-
export declare const mysqlPushIntrospect: (db: DB, databaseName: string, filters: string[]) => Promise<{
|
3
|
-
schema: {
|
4
|
-
tables: Record<string, {
|
5
|
-
name: string;
|
6
|
-
columns: Record<string, {
|
7
|
-
name: string;
|
8
|
-
type: string;
|
9
|
-
primaryKey: boolean;
|
10
|
-
notNull: boolean;
|
11
|
-
default?: any;
|
12
|
-
onUpdate?: any;
|
13
|
-
autoincrement?: boolean | undefined;
|
14
|
-
}>;
|
15
|
-
indexes: Record<string, {
|
16
|
-
name: string;
|
17
|
-
columns: string[];
|
18
|
-
isUnique: boolean;
|
19
|
-
using?: "btree" | "hash" | undefined;
|
20
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
21
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
22
|
-
}>;
|
23
|
-
foreignKeys: Record<string, {
|
24
|
-
name: string;
|
25
|
-
tableFrom: string;
|
26
|
-
columnsFrom: string[];
|
27
|
-
tableTo: string;
|
28
|
-
columnsTo: string[];
|
29
|
-
onUpdate?: string | undefined;
|
30
|
-
onDelete?: string | undefined;
|
31
|
-
}>;
|
32
|
-
compositePrimaryKeys: Record<string, {
|
33
|
-
name: string;
|
34
|
-
columns: string[];
|
35
|
-
}>;
|
36
|
-
uniqueConstraints: Record<string, {
|
37
|
-
name: string;
|
38
|
-
columns: string[];
|
39
|
-
}>;
|
40
|
-
}>;
|
41
|
-
id: string;
|
42
|
-
prevId: string;
|
43
|
-
version: "5";
|
44
|
-
dialect: "mysql";
|
45
|
-
_meta: {
|
46
|
-
columns: Record<string, string>;
|
47
|
-
tables: Record<string, string>;
|
48
|
-
};
|
49
|
-
};
|
50
|
-
}>;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { JsonStatement } from "../../jsonStatements";
|
2
|
-
import { mysqlSchema } from "../../serializer/mysqlSchema";
|
3
|
-
import { TypeOf } from "zod";
|
4
|
-
import type { DB } from "../../utils";
|
5
|
-
export declare const filterStatements: (statements: JsonStatement[], currentSchema: TypeOf<typeof mysqlSchema>, prevSchema: TypeOf<typeof mysqlSchema>) => JsonStatement[];
|
6
|
-
export declare const logSuggestionsAndReturn: (db: DB, statements: JsonStatement[], json2: TypeOf<typeof mysqlSchema>) => Promise<{
|
7
|
-
statementsToExecute: string[];
|
8
|
-
shouldAskForApprove: boolean;
|
9
|
-
infoToPrint: string[];
|
10
|
-
columnsToRemove: string[];
|
11
|
-
schemasToRemove: string[];
|
12
|
-
tablesToTruncate: string[];
|
13
|
-
tablesToRemove: string[];
|
14
|
-
}>;
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import type { DB } from "../../utils";
|
2
|
-
export declare const pgPushIntrospect: (db: DB, filters: string[], schemaFilters: string[]) => Promise<{
|
3
|
-
schema: {
|
4
|
-
tables: Record<string, {
|
5
|
-
name: string;
|
6
|
-
columns: Record<string, {
|
7
|
-
name: string;
|
8
|
-
type: string;
|
9
|
-
primaryKey: boolean;
|
10
|
-
notNull: boolean;
|
11
|
-
isUnique?: any;
|
12
|
-
default?: any;
|
13
|
-
typeSchema?: string | undefined;
|
14
|
-
uniqueName?: string | undefined;
|
15
|
-
nullsNotDistinct?: boolean | undefined;
|
16
|
-
}>;
|
17
|
-
indexes: Record<string, {
|
18
|
-
name: string;
|
19
|
-
columns: string[];
|
20
|
-
isUnique: boolean;
|
21
|
-
}>;
|
22
|
-
foreignKeys: Record<string, {
|
23
|
-
name: string;
|
24
|
-
tableFrom: string;
|
25
|
-
columnsFrom: string[];
|
26
|
-
tableTo: string;
|
27
|
-
columnsTo: string[];
|
28
|
-
onUpdate?: string | undefined;
|
29
|
-
onDelete?: string | undefined;
|
30
|
-
schemaTo?: string | undefined;
|
31
|
-
}>;
|
32
|
-
schema: string;
|
33
|
-
compositePrimaryKeys: Record<string, {
|
34
|
-
name: string;
|
35
|
-
columns: string[];
|
36
|
-
}>;
|
37
|
-
uniqueConstraints: Record<string, {
|
38
|
-
name: string;
|
39
|
-
columns: string[];
|
40
|
-
nullsNotDistinct: boolean;
|
41
|
-
}>;
|
42
|
-
}>;
|
43
|
-
id: string;
|
44
|
-
prevId: string;
|
45
|
-
version: "6";
|
46
|
-
dialect: "postgresql";
|
47
|
-
schemas: Record<string, string>;
|
48
|
-
_meta: {
|
49
|
-
columns: Record<string, string>;
|
50
|
-
tables: Record<string, string>;
|
51
|
-
schemas: Record<string, string>;
|
52
|
-
};
|
53
|
-
enums: Record<string, {
|
54
|
-
name: string;
|
55
|
-
values: string[];
|
56
|
-
schema: string;
|
57
|
-
}>;
|
58
|
-
};
|
59
|
-
}>;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { DB } from "../../utils";
|
2
|
-
import type { JsonStatement } from "../../jsonStatements";
|
3
|
-
export declare const pgSuggestions: (db: DB, statements: JsonStatement[]) => Promise<{
|
4
|
-
statementsToExecute: string[];
|
5
|
-
shouldAskForApprove: boolean;
|
6
|
-
infoToPrint: string[];
|
7
|
-
columnsToRemove: string[];
|
8
|
-
schemasToRemove: string[];
|
9
|
-
tablesToTruncate: string[];
|
10
|
-
tablesToRemove: string[];
|
11
|
-
}>;
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import type { SqliteCredentials } from "../validations/sqlite";
|
2
|
-
import type { SQLiteDB } from "../../utils";
|
3
|
-
import { Casing } from "../validations/common";
|
4
|
-
export declare const sqliteIntrospect: (credentials: SqliteCredentials, filters: string[], casing: Casing) => Promise<{
|
5
|
-
schema: {
|
6
|
-
tables: Record<string, {
|
7
|
-
name: string;
|
8
|
-
columns: Record<string, {
|
9
|
-
name: string;
|
10
|
-
type: string;
|
11
|
-
primaryKey: boolean;
|
12
|
-
notNull: boolean;
|
13
|
-
default?: any;
|
14
|
-
autoincrement?: boolean | undefined;
|
15
|
-
}>;
|
16
|
-
indexes: Record<string, {
|
17
|
-
name: string;
|
18
|
-
columns: string[];
|
19
|
-
isUnique: boolean;
|
20
|
-
where?: string | undefined;
|
21
|
-
}>;
|
22
|
-
foreignKeys: Record<string, {
|
23
|
-
name: string;
|
24
|
-
tableFrom: string;
|
25
|
-
columnsFrom: string[];
|
26
|
-
tableTo: string;
|
27
|
-
columnsTo: string[];
|
28
|
-
onUpdate?: string | undefined;
|
29
|
-
onDelete?: string | undefined;
|
30
|
-
}>;
|
31
|
-
compositePrimaryKeys: Record<string, {
|
32
|
-
columns: string[];
|
33
|
-
name?: string | undefined;
|
34
|
-
}>;
|
35
|
-
uniqueConstraints: Record<string, {
|
36
|
-
name: string;
|
37
|
-
columns: string[];
|
38
|
-
}>;
|
39
|
-
}>;
|
40
|
-
id: string;
|
41
|
-
prevId: string;
|
42
|
-
version: "5";
|
43
|
-
dialect: "sqlite";
|
44
|
-
_meta: {
|
45
|
-
columns: Record<string, string>;
|
46
|
-
tables: Record<string, string>;
|
47
|
-
};
|
48
|
-
enums: {};
|
49
|
-
};
|
50
|
-
ts: {
|
51
|
-
file: string;
|
52
|
-
imports: string;
|
53
|
-
decalrations: string;
|
54
|
-
schemaEntry: string;
|
55
|
-
};
|
56
|
-
}>;
|
57
|
-
export declare const sqlitePushIntrospect: (db: SQLiteDB, filters: string[]) => Promise<{
|
58
|
-
schema: {
|
59
|
-
tables: Record<string, {
|
60
|
-
name: string;
|
61
|
-
columns: Record<string, {
|
62
|
-
name: string;
|
63
|
-
type: string;
|
64
|
-
primaryKey: boolean;
|
65
|
-
notNull: boolean;
|
66
|
-
default?: any;
|
67
|
-
autoincrement?: boolean | undefined;
|
68
|
-
}>;
|
69
|
-
indexes: Record<string, {
|
70
|
-
name: string;
|
71
|
-
columns: string[];
|
72
|
-
isUnique: boolean;
|
73
|
-
where?: string | undefined;
|
74
|
-
}>;
|
75
|
-
foreignKeys: Record<string, {
|
76
|
-
name: string;
|
77
|
-
tableFrom: string;
|
78
|
-
columnsFrom: string[];
|
79
|
-
tableTo: string;
|
80
|
-
columnsTo: string[];
|
81
|
-
onUpdate?: string | undefined;
|
82
|
-
onDelete?: string | undefined;
|
83
|
-
}>;
|
84
|
-
compositePrimaryKeys: Record<string, {
|
85
|
-
columns: string[];
|
86
|
-
name?: string | undefined;
|
87
|
-
}>;
|
88
|
-
uniqueConstraints: Record<string, {
|
89
|
-
name: string;
|
90
|
-
columns: string[];
|
91
|
-
}>;
|
92
|
-
}>;
|
93
|
-
id: string;
|
94
|
-
prevId: string;
|
95
|
-
version: "5";
|
96
|
-
dialect: "sqlite";
|
97
|
-
_meta: {
|
98
|
-
columns: Record<string, string>;
|
99
|
-
tables: Record<string, string>;
|
100
|
-
};
|
101
|
-
enums: {};
|
102
|
-
};
|
103
|
-
}>;
|