drizzle-kit 0.20.14-c82ab68 → 0.20.14-d8f1e46
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +7142 -7442
- package/cli/commands/migrate.d.ts +24 -24
- package/cli/commands/mysqlIntrospect.d.ts +8 -8
- package/cli/commands/mysqlPushUtils.d.ts +2 -2
- package/cli/commands/mysqlUp.d.ts +2 -2
- package/cli/commands/pgConnect.d.ts +1 -1
- package/cli/commands/pgIntrospect.d.ts +9 -12
- package/cli/commands/pgPushUtils.d.ts +2 -2
- package/cli/commands/pgUp.d.ts +2 -2
- package/cli/commands/sqliteIntrospect.d.ts +9 -9
- package/cli/commands/sqlitePushUtils.d.ts +3 -3
- package/cli/commands/sqliteUtils.d.ts +162 -0
- package/cli/commands/upFolders.d.ts +1 -1
- package/cli/commands/utils.d.ts +259 -14
- package/cli/validations/common.d.ts +7 -205
- package/cli/validations/mysql.d.ts +1 -6
- package/cli/validations/pg.d.ts +1 -6
- package/cli/views.d.ts +1 -1
- package/global.d.ts +1 -1
- package/index.d.mts +6 -8
- package/index.d.ts +6 -8
- package/index.js +0 -1
- package/introspect-mysql.d.ts +1 -1
- package/introspect-pg.d.ts +2 -5
- package/introspect-sqlite.d.ts +1 -1
- package/jsonStatements.d.ts +1 -1
- package/package.json +2 -3
- package/payload.d.mts +988 -18
- package/payload.d.ts +988 -18
- package/payload.js +1616 -13426
- package/payload.mjs +1538 -2213
- package/schemaValidator.d.ts +40 -40
- package/serializer/mysqlSchema.d.ts +616 -1854
- package/serializer/mysqlSerializer.d.ts +2 -2
- package/serializer/pgSchema.d.ts +684 -1009
- package/serializer/sqliteSchema.d.ts +570 -144
- package/serializer/sqliteSerializer.d.ts +2 -2
- package/snapshotsDiffer.d.ts +20 -24
- package/utils-studio.js +15 -390
- package/utils-studio.mjs +15 -389
- package/utils.d.ts +12 -12
- package/utils.js +735 -849
- package/utils.mjs +736 -849
- package/cli/validations/cli.d.ts +0 -104
- package/cli/validations/sqlite.d.ts +0 -382
@@ -1,9 +1,9 @@
|
|
1
1
|
import { CommonSchema, CommonSquashedSchema, Dialect } from "../../schemaValidator";
|
2
2
|
import { schema } from "../views";
|
3
|
-
import { PgSchema } from "
|
4
|
-
import { SQLiteSchema } from "
|
5
|
-
import { MySqlSchema } from "
|
6
|
-
import { Journal } from "
|
3
|
+
import { PgSchema } from "src/serializer/pgSchema";
|
4
|
+
import { SQLiteSchema } from "src/serializer/sqliteSchema";
|
5
|
+
import { MySqlSchema } from "src/serializer/mysqlSchema";
|
6
|
+
import { Journal } from "src/utils";
|
7
7
|
import { GenerateConfig } from "./utils";
|
8
8
|
export type Named = {
|
9
9
|
name: string;
|
@@ -26,6 +26,10 @@ export declare const prepareMySQLPush: (config: {
|
|
26
26
|
} | undefined>;
|
27
27
|
} | undefined>;
|
28
28
|
} | undefined;
|
29
|
+
id: string;
|
30
|
+
prevId: string;
|
31
|
+
version: "5";
|
32
|
+
dialect: "mysql";
|
29
33
|
tables: Record<string, {
|
30
34
|
schema?: string | undefined;
|
31
35
|
name: string;
|
@@ -64,10 +68,6 @@ export declare const prepareMySQLPush: (config: {
|
|
64
68
|
columns: string[];
|
65
69
|
}>;
|
66
70
|
}>;
|
67
|
-
id: string;
|
68
|
-
prevId: string;
|
69
|
-
version: "6";
|
70
|
-
dialect: "mysql";
|
71
71
|
schemas: Record<string, string>;
|
72
72
|
_meta: {
|
73
73
|
columns: Record<string, string>;
|
@@ -83,6 +83,10 @@ export declare const prepareMySQLPush: (config: {
|
|
83
83
|
} | undefined>;
|
84
84
|
} | undefined>;
|
85
85
|
} | undefined;
|
86
|
+
id: string;
|
87
|
+
prevId: string;
|
88
|
+
version: "5";
|
89
|
+
dialect: "mysql";
|
86
90
|
tables: Record<string, {
|
87
91
|
schema?: string | undefined;
|
88
92
|
name: string;
|
@@ -121,10 +125,6 @@ export declare const prepareMySQLPush: (config: {
|
|
121
125
|
columns: string[];
|
122
126
|
}>;
|
123
127
|
}>;
|
124
|
-
id: string;
|
125
|
-
prevId: string;
|
126
|
-
version: "6";
|
127
|
-
dialect: "mysql";
|
128
128
|
schemas: Record<string, string>;
|
129
129
|
_meta: {
|
130
130
|
columns: Record<string, string>;
|
@@ -132,7 +132,7 @@ export declare const prepareMySQLPush: (config: {
|
|
132
132
|
schemas: Record<string, string>;
|
133
133
|
};
|
134
134
|
};
|
135
|
-
}>;
|
135
|
+
} | undefined>;
|
136
136
|
export declare const prepareSQLitePush: (config: {
|
137
137
|
schema: string | string[];
|
138
138
|
}, snapshot: SQLiteSchema) => Promise<{
|
@@ -140,6 +140,8 @@ export declare const prepareSQLitePush: (config: {
|
|
140
140
|
statements: import("../../jsonStatements").JsonStatement[];
|
141
141
|
squashedPrev: {
|
142
142
|
enums?: any;
|
143
|
+
version: "5";
|
144
|
+
dialect: "sqlite";
|
143
145
|
tables: Record<string, {
|
144
146
|
name: string;
|
145
147
|
columns: Record<string, {
|
@@ -155,11 +157,11 @@ export declare const prepareSQLitePush: (config: {
|
|
155
157
|
compositePrimaryKeys: Record<string, string>;
|
156
158
|
uniqueConstraints: Record<string, string>;
|
157
159
|
}>;
|
158
|
-
version: "5";
|
159
|
-
dialect: "sqlite";
|
160
160
|
};
|
161
161
|
squashedCur: {
|
162
162
|
enums?: any;
|
163
|
+
version: "5";
|
164
|
+
dialect: "sqlite";
|
163
165
|
tables: Record<string, {
|
164
166
|
name: string;
|
165
167
|
columns: Record<string, {
|
@@ -175,21 +177,21 @@ export declare const prepareSQLitePush: (config: {
|
|
175
177
|
compositePrimaryKeys: Record<string, string>;
|
176
178
|
uniqueConstraints: Record<string, string>;
|
177
179
|
}>;
|
178
|
-
version: "5";
|
179
|
-
dialect: "sqlite";
|
180
180
|
};
|
181
181
|
meta: {
|
182
182
|
schemas: {};
|
183
183
|
tables: {};
|
184
184
|
columns: {};
|
185
185
|
} | undefined;
|
186
|
-
}>;
|
186
|
+
} | undefined>;
|
187
187
|
export declare const preparePgPush: (config: {
|
188
188
|
schema: string | string[];
|
189
189
|
}, snapshot: PgSchema, schemaFilter: string[]) => Promise<{
|
190
190
|
sqlStatements: string[];
|
191
191
|
statements: import("../../jsonStatements").JsonStatement[];
|
192
192
|
squashedPrev: {
|
193
|
+
version: "5";
|
194
|
+
dialect: "pg";
|
193
195
|
tables: Record<string, {
|
194
196
|
name: string;
|
195
197
|
columns: Record<string, {
|
@@ -208,8 +210,6 @@ export declare const preparePgPush: (config: {
|
|
208
210
|
compositePrimaryKeys: Record<string, string>;
|
209
211
|
uniqueConstraints: Record<string, string>;
|
210
212
|
}>;
|
211
|
-
version: "6";
|
212
|
-
dialect: "pg";
|
213
213
|
schemas: Record<string, string>;
|
214
214
|
enums: Record<string, {
|
215
215
|
name: string;
|
@@ -217,6 +217,8 @@ export declare const preparePgPush: (config: {
|
|
217
217
|
}>;
|
218
218
|
};
|
219
219
|
squashedCur: {
|
220
|
+
version: "5";
|
221
|
+
dialect: "pg";
|
220
222
|
tables: Record<string, {
|
221
223
|
name: string;
|
222
224
|
columns: Record<string, {
|
@@ -235,18 +237,16 @@ export declare const preparePgPush: (config: {
|
|
235
237
|
compositePrimaryKeys: Record<string, string>;
|
236
238
|
uniqueConstraints: Record<string, string>;
|
237
239
|
}>;
|
238
|
-
version: "6";
|
239
|
-
dialect: "pg";
|
240
240
|
schemas: Record<string, string>;
|
241
241
|
enums: Record<string, {
|
242
242
|
name: string;
|
243
243
|
values: Record<string, string>;
|
244
244
|
}>;
|
245
245
|
};
|
246
|
-
}>;
|
246
|
+
} | undefined>;
|
247
247
|
export declare const prepareAndMigrateMySql: (config: GenerateConfig) => Promise<void>;
|
248
248
|
export declare const prepareAndMigrateSqlite: (config: GenerateConfig) => Promise<void>;
|
249
|
-
export declare const prepareSQL: (prev: CommonSquashedSchema, cur: CommonSquashedSchema, dialect: Dialect, prevFull
|
249
|
+
export declare const prepareSQL: (prev: CommonSquashedSchema, cur: CommonSquashedSchema, dialect: Dialect, prevFull?: any, curFull?: any) => Promise<{
|
250
250
|
statements: import("../../jsonStatements").JsonStatement[];
|
251
251
|
sqlStatements: string[];
|
252
252
|
_meta: {
|
@@ -6,6 +6,10 @@ export declare const connectToMySQL: (config: MySQLConnectionConfig) => Promise<
|
|
6
6
|
}>;
|
7
7
|
export declare const mysqlIntrospect: (config: MySQLConfigIntrospect, filters: string[]) => Promise<{
|
8
8
|
schema: {
|
9
|
+
id: string;
|
10
|
+
prevId: string;
|
11
|
+
version: "5";
|
12
|
+
dialect: "mysql";
|
9
13
|
tables: Record<string, {
|
10
14
|
schema?: string | undefined;
|
11
15
|
name: string;
|
@@ -44,10 +48,6 @@ export declare const mysqlIntrospect: (config: MySQLConfigIntrospect, filters: s
|
|
44
48
|
columns: string[];
|
45
49
|
}>;
|
46
50
|
}>;
|
47
|
-
id: string;
|
48
|
-
prevId: string;
|
49
|
-
version: "6";
|
50
|
-
dialect: "mysql";
|
51
51
|
schemas: Record<string, string>;
|
52
52
|
_meta: {
|
53
53
|
columns: Record<string, string>;
|
@@ -67,6 +67,10 @@ export declare const mysqlPushIntrospect: (connection: {
|
|
67
67
|
databaseName: string;
|
68
68
|
}, filters: string[]) => Promise<{
|
69
69
|
schema: {
|
70
|
+
id: string;
|
71
|
+
prevId: string;
|
72
|
+
version: "5";
|
73
|
+
dialect: "mysql";
|
70
74
|
tables: Record<string, {
|
71
75
|
schema?: string | undefined;
|
72
76
|
name: string;
|
@@ -105,10 +109,6 @@ export declare const mysqlPushIntrospect: (connection: {
|
|
105
109
|
columns: string[];
|
106
110
|
}>;
|
107
111
|
}>;
|
108
|
-
id: string;
|
109
|
-
prevId: string;
|
110
|
-
version: "6";
|
111
|
-
dialect: "mysql";
|
112
112
|
schemas: Record<string, string>;
|
113
113
|
_meta: {
|
114
114
|
columns: Record<string, string>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DrizzleDbClient } from "src/drivers";
|
2
|
-
import { JsonStatement } from "
|
3
|
-
import { mysqlSchema } from "
|
2
|
+
import { JsonStatement } from "src/jsonStatements";
|
3
|
+
import { mysqlSchema } from "src/serializer/mysqlSchema";
|
4
4
|
import { TypeOf } from "zod";
|
5
5
|
export declare const filterStatements: (statements: JsonStatement[], currentSchema: TypeOf<typeof mysqlSchema>, prevSchema: TypeOf<typeof mysqlSchema>) => JsonStatement[];
|
6
6
|
export declare const logSuggestionsAndReturn: ({ connection, statements, json2, }: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { MySqlSchema, MySqlSchemaV4 } from "src/serializer/mysqlSchema";
|
2
2
|
export declare const upMysqlHandler: (out: string) => void;
|
3
|
-
export declare const upMySqlHandlerV4toV5: (obj: MySqlSchemaV4) =>
|
3
|
+
export declare const upMySqlHandlerV4toV5: (obj: MySqlSchemaV4) => MySqlSchema;
|
4
4
|
export declare const upMysqlHandlerV4: (out: string) => void;
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import type { PgConfigIntrospect } from "../validations/pg";
|
2
|
-
import type { DrizzleDbClient } from "
|
2
|
+
import type { DrizzleDbClient } from "src/drivers";
|
3
3
|
export declare const pgSchemas: (client: DrizzleDbClient) => Promise<string[]>;
|
4
4
|
export declare const pgPushIntrospect: (connection: {
|
5
5
|
client: DrizzleDbClient;
|
6
6
|
}, filters: string[], schemaFilters: string[]) => Promise<{
|
7
7
|
schema: {
|
8
|
+
id: string;
|
9
|
+
prevId: string;
|
10
|
+
version: "5";
|
11
|
+
dialect: "pg";
|
8
12
|
tables: Record<string, {
|
9
13
|
name: string;
|
10
14
|
columns: Record<string, {
|
@@ -43,10 +47,6 @@ export declare const pgPushIntrospect: (connection: {
|
|
43
47
|
nullsNotDistinct: boolean;
|
44
48
|
}>;
|
45
49
|
}>;
|
46
|
-
id: string;
|
47
|
-
prevId: string;
|
48
|
-
version: "6";
|
49
|
-
dialect: "pg";
|
50
50
|
schemas: Record<string, string>;
|
51
51
|
_meta: {
|
52
52
|
columns: Record<string, string>;
|
@@ -61,6 +61,10 @@ export declare const pgPushIntrospect: (connection: {
|
|
61
61
|
}>;
|
62
62
|
export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[], schemaFilters: string[]) => Promise<{
|
63
63
|
schema: {
|
64
|
+
id: string;
|
65
|
+
prevId: string;
|
66
|
+
version: "5";
|
67
|
+
dialect: "pg";
|
64
68
|
tables: Record<string, {
|
65
69
|
name: string;
|
66
70
|
columns: Record<string, {
|
@@ -99,10 +103,6 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
99
103
|
nullsNotDistinct: boolean;
|
100
104
|
}>;
|
101
105
|
}>;
|
102
|
-
id: string;
|
103
|
-
prevId: string;
|
104
|
-
version: "6";
|
105
|
-
dialect: "pg";
|
106
106
|
schemas: Record<string, string>;
|
107
107
|
_meta: {
|
108
108
|
columns: Record<string, string>;
|
@@ -120,7 +120,4 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
120
120
|
decalrations: string;
|
121
121
|
schemaEntry: string;
|
122
122
|
};
|
123
|
-
relationsTs: {
|
124
|
-
file: string;
|
125
|
-
};
|
126
123
|
}>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DrizzleDbClient } from "
|
2
|
-
import { JsonStatement } from "
|
1
|
+
import { DrizzleDbClient } from "src/drivers";
|
2
|
+
import { JsonStatement } from "src/jsonStatements";
|
3
3
|
export declare const pgSuggestions: ({ connection, statements, }: {
|
4
4
|
statements: JsonStatement[];
|
5
5
|
connection: DrizzleDbClient;
|
package/cli/commands/pgUp.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { PgSchema, PgSchemaV4 } from "src/serializer/pgSchema";
|
2
|
+
export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchema;
|
2
3
|
export declare const upPgHandler: (out: string) => void;
|
3
|
-
export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchemaV5;
|
4
4
|
export declare const upPgHandlerV4: (out: string) => void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { SQLiteCliConfig, SQLiteConnectionConfig } from "
|
1
|
+
import type { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
|
2
2
|
import type { DrizzleDbClient } from "../../drivers";
|
3
3
|
export declare const connectToSQLite: (config: SQLiteConnectionConfig) => Promise<{
|
4
4
|
client: import("../../drivers").BetterSqlite;
|
@@ -7,6 +7,10 @@ export declare const connectToSQLite: (config: SQLiteConnectionConfig) => Promis
|
|
7
7
|
}>;
|
8
8
|
export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string[]) => Promise<{
|
9
9
|
schema: {
|
10
|
+
id: string;
|
11
|
+
prevId: string;
|
12
|
+
version: "5";
|
13
|
+
dialect: "sqlite";
|
10
14
|
tables: Record<string, {
|
11
15
|
name: string;
|
12
16
|
columns: Record<string, {
|
@@ -41,10 +45,6 @@ export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string
|
|
41
45
|
columns: string[];
|
42
46
|
}>;
|
43
47
|
}>;
|
44
|
-
id: string;
|
45
|
-
prevId: string;
|
46
|
-
version: "5";
|
47
|
-
dialect: "sqlite";
|
48
48
|
_meta: {
|
49
49
|
columns: Record<string, string>;
|
50
50
|
tables: Record<string, string>;
|
@@ -60,6 +60,10 @@ export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string
|
|
60
60
|
}>;
|
61
61
|
export declare const sqlitePushIntrospect: (client: DrizzleDbClient, filters: string[]) => Promise<{
|
62
62
|
schema: {
|
63
|
+
id: string;
|
64
|
+
prevId: string;
|
65
|
+
version: "5";
|
66
|
+
dialect: "sqlite";
|
63
67
|
tables: Record<string, {
|
64
68
|
name: string;
|
65
69
|
columns: Record<string, {
|
@@ -94,10 +98,6 @@ export declare const sqlitePushIntrospect: (client: DrizzleDbClient, filters: st
|
|
94
98
|
columns: string[];
|
95
99
|
}>;
|
96
100
|
}>;
|
97
|
-
id: string;
|
98
|
-
prevId: string;
|
99
|
-
version: "5";
|
100
|
-
dialect: "sqlite";
|
101
101
|
_meta: {
|
102
102
|
columns: Record<string, string>;
|
103
103
|
tables: Record<string, string>;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { DrizzleDbClient } from "
|
2
|
-
import { JsonStatement } from "
|
3
|
-
import { SQLiteSchemaInternal, SQLiteSchemaSquashed } from "
|
1
|
+
import { DrizzleDbClient } from "src/drivers";
|
2
|
+
import { JsonStatement } from "src/jsonStatements";
|
3
|
+
import { SQLiteSchemaInternal, SQLiteSchemaSquashed } from "src/serializer/sqliteSchema";
|
4
4
|
export declare const _moveDataStatements: (tableName: string, json: SQLiteSchemaSquashed, dataLoss?: boolean) => string[];
|
5
5
|
export declare const getOldTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
6
6
|
export declare const getNewTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
@@ -0,0 +1,162 @@
|
|
1
|
+
import { TypeOf } from "zod";
|
2
|
+
import { configIntrospectSchema } from "./utils";
|
3
|
+
export declare const sqliteConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
4
|
+
driver: import("zod").ZodLiteral<"turso">;
|
5
|
+
dbCredentials: import("zod").ZodObject<{
|
6
|
+
url: import("zod").ZodString;
|
7
|
+
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
8
|
+
}, "strip", import("zod").ZodTypeAny, {
|
9
|
+
authToken?: string | undefined;
|
10
|
+
url: string;
|
11
|
+
}, {
|
12
|
+
authToken?: string | undefined;
|
13
|
+
url: string;
|
14
|
+
}>;
|
15
|
+
}, "strip", import("zod").ZodTypeAny, {
|
16
|
+
driver: "turso";
|
17
|
+
dbCredentials: {
|
18
|
+
authToken?: string | undefined;
|
19
|
+
url: string;
|
20
|
+
};
|
21
|
+
}, {
|
22
|
+
driver: "turso";
|
23
|
+
dbCredentials: {
|
24
|
+
authToken?: string | undefined;
|
25
|
+
url: string;
|
26
|
+
};
|
27
|
+
}>, import("zod").ZodObject<{
|
28
|
+
driver: import("zod").ZodLiteral<"libsql">;
|
29
|
+
dbCredentials: import("zod").ZodObject<{
|
30
|
+
url: import("zod").ZodString;
|
31
|
+
}, "strip", import("zod").ZodTypeAny, {
|
32
|
+
url: string;
|
33
|
+
}, {
|
34
|
+
url: string;
|
35
|
+
}>;
|
36
|
+
}, "strip", import("zod").ZodTypeAny, {
|
37
|
+
driver: "libsql";
|
38
|
+
dbCredentials: {
|
39
|
+
url: string;
|
40
|
+
};
|
41
|
+
}, {
|
42
|
+
driver: "libsql";
|
43
|
+
dbCredentials: {
|
44
|
+
url: string;
|
45
|
+
};
|
46
|
+
}>, import("zod").ZodObject<{
|
47
|
+
driver: import("zod").ZodLiteral<"better-sqlite">;
|
48
|
+
dbCredentials: import("zod").ZodObject<{
|
49
|
+
url: import("zod").ZodString;
|
50
|
+
}, "strip", import("zod").ZodTypeAny, {
|
51
|
+
url: string;
|
52
|
+
}, {
|
53
|
+
url: string;
|
54
|
+
}>;
|
55
|
+
}, "strip", import("zod").ZodTypeAny, {
|
56
|
+
driver: "better-sqlite";
|
57
|
+
dbCredentials: {
|
58
|
+
url: string;
|
59
|
+
};
|
60
|
+
}, {
|
61
|
+
driver: "better-sqlite";
|
62
|
+
dbCredentials: {
|
63
|
+
url: string;
|
64
|
+
};
|
65
|
+
}>]>;
|
66
|
+
export declare const sqliteCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
67
|
+
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
68
|
+
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
69
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
70
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
71
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
72
|
+
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
73
|
+
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
74
|
+
}, "strip", import("zod").ZodTypeAny, {
|
75
|
+
casing: "camel" | "preserve";
|
76
|
+
}, {
|
77
|
+
casing?: "camel" | "preserve" | undefined;
|
78
|
+
}>>;
|
79
|
+
}, "strip", import("zod").ZodTypeAny, {
|
80
|
+
schema?: string | string[] | undefined;
|
81
|
+
tablesFilter?: string | string[] | undefined;
|
82
|
+
out: string;
|
83
|
+
breakpoints: boolean;
|
84
|
+
schemaFilter: string | string[];
|
85
|
+
introspect: {
|
86
|
+
casing: "camel" | "preserve";
|
87
|
+
};
|
88
|
+
}, {
|
89
|
+
schema?: string | string[] | undefined;
|
90
|
+
out?: string | undefined;
|
91
|
+
breakpoints?: boolean | undefined;
|
92
|
+
tablesFilter?: string | string[] | undefined;
|
93
|
+
schemaFilter?: string | string[] | undefined;
|
94
|
+
introspect?: {
|
95
|
+
casing?: "camel" | "preserve" | undefined;
|
96
|
+
} | undefined;
|
97
|
+
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
98
|
+
driver: import("zod").ZodLiteral<"turso">;
|
99
|
+
dbCredentials: import("zod").ZodObject<{
|
100
|
+
url: import("zod").ZodString;
|
101
|
+
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
102
|
+
}, "strip", import("zod").ZodTypeAny, {
|
103
|
+
authToken?: string | undefined;
|
104
|
+
url: string;
|
105
|
+
}, {
|
106
|
+
authToken?: string | undefined;
|
107
|
+
url: string;
|
108
|
+
}>;
|
109
|
+
}, "strip", import("zod").ZodTypeAny, {
|
110
|
+
driver: "turso";
|
111
|
+
dbCredentials: {
|
112
|
+
authToken?: string | undefined;
|
113
|
+
url: string;
|
114
|
+
};
|
115
|
+
}, {
|
116
|
+
driver: "turso";
|
117
|
+
dbCredentials: {
|
118
|
+
authToken?: string | undefined;
|
119
|
+
url: string;
|
120
|
+
};
|
121
|
+
}>, import("zod").ZodObject<{
|
122
|
+
driver: import("zod").ZodLiteral<"libsql">;
|
123
|
+
dbCredentials: import("zod").ZodObject<{
|
124
|
+
url: import("zod").ZodString;
|
125
|
+
}, "strip", import("zod").ZodTypeAny, {
|
126
|
+
url: string;
|
127
|
+
}, {
|
128
|
+
url: string;
|
129
|
+
}>;
|
130
|
+
}, "strip", import("zod").ZodTypeAny, {
|
131
|
+
driver: "libsql";
|
132
|
+
dbCredentials: {
|
133
|
+
url: string;
|
134
|
+
};
|
135
|
+
}, {
|
136
|
+
driver: "libsql";
|
137
|
+
dbCredentials: {
|
138
|
+
url: string;
|
139
|
+
};
|
140
|
+
}>, import("zod").ZodObject<{
|
141
|
+
driver: import("zod").ZodLiteral<"better-sqlite">;
|
142
|
+
dbCredentials: import("zod").ZodObject<{
|
143
|
+
url: import("zod").ZodString;
|
144
|
+
}, "strip", import("zod").ZodTypeAny, {
|
145
|
+
url: string;
|
146
|
+
}, {
|
147
|
+
url: string;
|
148
|
+
}>;
|
149
|
+
}, "strip", import("zod").ZodTypeAny, {
|
150
|
+
driver: "better-sqlite";
|
151
|
+
dbCredentials: {
|
152
|
+
url: string;
|
153
|
+
};
|
154
|
+
}, {
|
155
|
+
driver: "better-sqlite";
|
156
|
+
dbCredentials: {
|
157
|
+
url: string;
|
158
|
+
};
|
159
|
+
}>]>>;
|
160
|
+
export type SQLiteCliConfig = TypeOf<typeof sqliteCliConfigSchema>;
|
161
|
+
export type SQLiteConnectionConfig = TypeOf<typeof sqliteConnectionSchema>;
|
162
|
+
export { configIntrospectSchema };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Dialect } from "
|
1
|
+
import { Dialect } from "src/schemaValidator";
|
2
2
|
import { Named, NamedWithSchema } from "./migrate";
|
3
3
|
export declare const resolveSchemas: <T extends Named>(missingSchemas: T[], newSchemas: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
|
4
4
|
created: T[];
|