drizzle-kit 0.20.14-a183d8b → 0.20.14-c82ab68
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +4957 -4374
- package/cli/commands/migrate.d.ts +17 -17
- package/cli/commands/mysqlIntrospect.d.ts +8 -8
- package/cli/commands/mysqlUp.d.ts +2 -2
- package/cli/commands/pgIntrospect.d.ts +11 -8
- package/cli/commands/pgUp.d.ts +2 -2
- package/cli/commands/sqliteIntrospect.d.ts +8 -8
- package/cli/commands/utils.d.ts +4 -5
- package/cli/{index.d.ts → validations/cli.d.ts} +30 -20
- package/cli/validations/common.d.ts +1 -1
- package/global.d.ts +1 -1
- package/index.js +1 -0
- package/introspect-pg.d.ts +4 -1
- package/jsonStatements.d.ts +1 -1
- package/package.json +3 -1
- package/payload.js +565 -113
- package/payload.mjs +564 -113
- package/schemaValidator.d.ts +39 -39
- package/serializer/mysqlSchema.d.ts +1991 -753
- package/serializer/pgSchema.d.ts +1113 -788
- package/serializer/sqliteSchema.d.ts +144 -570
- package/snapshotsDiffer.d.ts +24 -20
- package/utils-studio.js +379 -9
- package/utils-studio.mjs +378 -9
- package/utils.d.ts +12 -12
- package/utils.js +146 -85
- package/utils.mjs +145 -85
- package/cli/commands/check.d.ts +0 -2
- package/cli/commands/drop.d.ts +0 -4
- package/cli/commands/push.d.ts +0 -6
- package/cli/commands/sqliteUp.d.ts +0 -2
- package/cli/utils.d.ts +0 -12
- package/cli/validations/studio.d.ts +0 -593
- package/orm-extenstions/d1-driver/driver.d.ts +0 -8
- package/orm-extenstions/d1-driver/session.d.ts +0 -51
- package/orm-extenstions/d1-driver/wrangler-client.d.ts +0 -3
- package/serializer/studioUtils.d.ts +0 -65
- package/utils/certs.d.ts +0 -4
@@ -26,10 +26,6 @@ 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";
|
33
29
|
tables: Record<string, {
|
34
30
|
schema?: string | undefined;
|
35
31
|
name: string;
|
@@ -68,6 +64,10 @@ export declare const prepareMySQLPush: (config: {
|
|
68
64
|
columns: string[];
|
69
65
|
}>;
|
70
66
|
}>;
|
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,10 +83,6 @@ 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";
|
90
86
|
tables: Record<string, {
|
91
87
|
schema?: string | undefined;
|
92
88
|
name: string;
|
@@ -125,6 +121,10 @@ export declare const prepareMySQLPush: (config: {
|
|
125
121
|
columns: string[];
|
126
122
|
}>;
|
127
123
|
}>;
|
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>;
|
@@ -140,8 +140,6 @@ export declare const prepareSQLitePush: (config: {
|
|
140
140
|
statements: import("../../jsonStatements").JsonStatement[];
|
141
141
|
squashedPrev: {
|
142
142
|
enums?: any;
|
143
|
-
version: "5";
|
144
|
-
dialect: "sqlite";
|
145
143
|
tables: Record<string, {
|
146
144
|
name: string;
|
147
145
|
columns: Record<string, {
|
@@ -157,11 +155,11 @@ export declare const prepareSQLitePush: (config: {
|
|
157
155
|
compositePrimaryKeys: Record<string, string>;
|
158
156
|
uniqueConstraints: Record<string, string>;
|
159
157
|
}>;
|
158
|
+
version: "5";
|
159
|
+
dialect: "sqlite";
|
160
160
|
};
|
161
161
|
squashedCur: {
|
162
162
|
enums?: any;
|
163
|
-
version: "5";
|
164
|
-
dialect: "sqlite";
|
165
163
|
tables: Record<string, {
|
166
164
|
name: string;
|
167
165
|
columns: Record<string, {
|
@@ -177,6 +175,8 @@ export declare const prepareSQLitePush: (config: {
|
|
177
175
|
compositePrimaryKeys: Record<string, string>;
|
178
176
|
uniqueConstraints: Record<string, string>;
|
179
177
|
}>;
|
178
|
+
version: "5";
|
179
|
+
dialect: "sqlite";
|
180
180
|
};
|
181
181
|
meta: {
|
182
182
|
schemas: {};
|
@@ -190,8 +190,6 @@ export declare const preparePgPush: (config: {
|
|
190
190
|
sqlStatements: string[];
|
191
191
|
statements: import("../../jsonStatements").JsonStatement[];
|
192
192
|
squashedPrev: {
|
193
|
-
version: "5";
|
194
|
-
dialect: "pg";
|
195
193
|
tables: Record<string, {
|
196
194
|
name: string;
|
197
195
|
columns: Record<string, {
|
@@ -210,6 +208,8 @@ export declare const preparePgPush: (config: {
|
|
210
208
|
compositePrimaryKeys: Record<string, string>;
|
211
209
|
uniqueConstraints: Record<string, string>;
|
212
210
|
}>;
|
211
|
+
version: "6";
|
212
|
+
dialect: "pg";
|
213
213
|
schemas: Record<string, string>;
|
214
214
|
enums: Record<string, {
|
215
215
|
name: string;
|
@@ -217,8 +217,6 @@ export declare const preparePgPush: (config: {
|
|
217
217
|
}>;
|
218
218
|
};
|
219
219
|
squashedCur: {
|
220
|
-
version: "5";
|
221
|
-
dialect: "pg";
|
222
220
|
tables: Record<string, {
|
223
221
|
name: string;
|
224
222
|
columns: Record<string, {
|
@@ -237,6 +235,8 @@ export declare const preparePgPush: (config: {
|
|
237
235
|
compositePrimaryKeys: Record<string, string>;
|
238
236
|
uniqueConstraints: Record<string, string>;
|
239
237
|
}>;
|
238
|
+
version: "6";
|
239
|
+
dialect: "pg";
|
240
240
|
schemas: Record<string, string>;
|
241
241
|
enums: Record<string, {
|
242
242
|
name: string;
|
@@ -246,7 +246,7 @@ export declare const preparePgPush: (config: {
|
|
246
246
|
}>;
|
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: PgSchema | MySqlSchema | SQLiteSchema, curFull: PgSchema | MySqlSchema | SQLiteSchema) => Promise<{
|
250
250
|
statements: import("../../jsonStatements").JsonStatement[];
|
251
251
|
sqlStatements: string[];
|
252
252
|
_meta: {
|
@@ -6,10 +6,6 @@ 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";
|
13
9
|
tables: Record<string, {
|
14
10
|
schema?: string | undefined;
|
15
11
|
name: string;
|
@@ -48,6 +44,10 @@ export declare const mysqlIntrospect: (config: MySQLConfigIntrospect, filters: s
|
|
48
44
|
columns: string[];
|
49
45
|
}>;
|
50
46
|
}>;
|
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,10 +67,6 @@ 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";
|
74
70
|
tables: Record<string, {
|
75
71
|
schema?: string | undefined;
|
76
72
|
name: string;
|
@@ -109,6 +105,10 @@ export declare const mysqlPushIntrospect: (connection: {
|
|
109
105
|
columns: string[];
|
110
106
|
}>;
|
111
107
|
}>;
|
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,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { MySqlSchemaV4, MySqlSchemaV5 } from "../../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) => MySqlSchemaV5;
|
4
4
|
export declare const upMysqlHandlerV4: (out: string) => void;
|
@@ -5,10 +5,6 @@ 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";
|
12
8
|
tables: Record<string, {
|
13
9
|
name: string;
|
14
10
|
columns: Record<string, {
|
@@ -47,6 +43,10 @@ export declare const pgPushIntrospect: (connection: {
|
|
47
43
|
nullsNotDistinct: boolean;
|
48
44
|
}>;
|
49
45
|
}>;
|
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,10 +61,6 @@ 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";
|
68
64
|
tables: Record<string, {
|
69
65
|
name: string;
|
70
66
|
columns: Record<string, {
|
@@ -103,6 +99,10 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
103
99
|
nullsNotDistinct: boolean;
|
104
100
|
}>;
|
105
101
|
}>;
|
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,4 +120,7 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
120
120
|
decalrations: string;
|
121
121
|
schemaEntry: string;
|
122
122
|
};
|
123
|
+
relationsTs: {
|
124
|
+
file: string;
|
125
|
+
};
|
123
126
|
}>;
|
package/cli/commands/pgUp.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchema;
|
1
|
+
import { PgSchemaV4, PgSchemaV5 } from "../../serializer/pgSchema";
|
3
2
|
export declare const upPgHandler: (out: string) => void;
|
3
|
+
export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchemaV5;
|
4
4
|
export declare const upPgHandlerV4: (out: string) => void;
|
@@ -7,10 +7,6 @@ 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";
|
14
10
|
tables: Record<string, {
|
15
11
|
name: string;
|
16
12
|
columns: Record<string, {
|
@@ -45,6 +41,10 @@ export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string
|
|
45
41
|
columns: string[];
|
46
42
|
}>;
|
47
43
|
}>;
|
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,10 +60,6 @@ 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";
|
67
63
|
tables: Record<string, {
|
68
64
|
name: string;
|
69
65
|
columns: Record<string, {
|
@@ -98,6 +94,10 @@ export declare const sqlitePushIntrospect: (client: DrizzleDbClient, filters: st
|
|
98
94
|
columns: string[];
|
99
95
|
}>;
|
100
96
|
}>;
|
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>;
|
package/cli/commands/utils.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { CliConfigGenerate, CliParamsPush } from "..";
|
2
1
|
import { MySQLPushConfig } from "../validations/mysql";
|
3
2
|
import { PgPushConfig } from "../validations/pg";
|
4
3
|
import { SQLitePushConfig } from "../validations/sqlite";
|
5
4
|
import { CliConfig } from "../validations/common";
|
6
5
|
import { Dialect } from "src/schemaValidator";
|
6
|
+
import { CliCheckConfig, CliConfigGenerate, CliParamsPush } from "../validations/cli";
|
7
7
|
export declare const safeRegister: () => Promise<{
|
8
8
|
unregister: () => void;
|
9
9
|
}>;
|
@@ -21,10 +21,9 @@ export declare const preparePushConfig: (options: CliParamsPush) => Promise<{
|
|
21
21
|
schemaFiles: string[];
|
22
22
|
tablesFilter: string[];
|
23
23
|
}>;
|
24
|
-
export declare const assertOutFolder: (it: {
|
25
|
-
config?: string;
|
26
|
-
} | {
|
24
|
+
export declare const assertOutFolder: (it: CliCheckConfig) => Promise<{
|
27
25
|
out: string;
|
28
|
-
|
26
|
+
dialect: Dialect;
|
27
|
+
}>;
|
29
28
|
export declare const drizzleConfigFromFile: (configPath?: string) => Promise<CliConfig>;
|
30
29
|
export declare const readDrizzleConfig: (configPath?: string) => Promise<any>;
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import { TypeOf } from "zod";
|
2
|
-
import
|
3
|
-
import "dotenv/config";
|
4
|
-
declare const cliConfigGenerate: import("zod").ZodObject<{
|
2
|
+
export declare const cliConfigGenerate: import("zod").ZodObject<{
|
5
3
|
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
6
4
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
7
5
|
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
@@ -19,25 +17,25 @@ declare const cliConfigGenerate: import("zod").ZodObject<{
|
|
19
17
|
custom?: boolean | undefined;
|
20
18
|
schema?: string | string[] | undefined;
|
21
19
|
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
22
|
-
out?: string | undefined;
|
23
20
|
config?: string | undefined;
|
21
|
+
out?: string | undefined;
|
24
22
|
breakpoints?: boolean | undefined;
|
25
23
|
}>;
|
26
24
|
export type CliConfigGenerate = TypeOf<typeof cliConfigGenerate>;
|
27
|
-
declare const cliParamsPush: import("zod").ZodObject<{
|
25
|
+
export declare const cliParamsPush: import("zod").ZodObject<{
|
28
26
|
config: import("zod").ZodOptional<import("zod").ZodString>;
|
29
27
|
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
30
28
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
31
29
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
32
30
|
driver: import("zod").ZodOptional<import("zod").ZodString>;
|
33
31
|
connectionString: import("zod").ZodOptional<import("zod").ZodString>;
|
32
|
+
uri: import("zod").ZodOptional<import("zod").ZodString>;
|
34
33
|
host: import("zod").ZodOptional<import("zod").ZodString>;
|
35
34
|
port: import("zod").ZodOptional<import("zod").ZodString>;
|
36
35
|
user: import("zod").ZodOptional<import("zod").ZodString>;
|
37
36
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
38
37
|
database: import("zod").ZodOptional<import("zod").ZodString>;
|
39
38
|
ssl: import("zod").ZodOptional<import("zod").ZodString>;
|
40
|
-
uri: import("zod").ZodOptional<import("zod").ZodString>;
|
41
39
|
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
42
40
|
verbose: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
43
41
|
strict: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
@@ -55,9 +53,9 @@ declare const cliParamsPush: import("zod").ZodObject<{
|
|
55
53
|
password?: string | undefined;
|
56
54
|
database?: string | undefined;
|
57
55
|
connectionString?: string | undefined;
|
58
|
-
authToken?: string | undefined;
|
59
|
-
ssl?: string | undefined;
|
60
56
|
uri?: string | undefined;
|
57
|
+
ssl?: string | undefined;
|
58
|
+
authToken?: string | undefined;
|
61
59
|
}, {
|
62
60
|
strict?: boolean | undefined;
|
63
61
|
schema?: string | string[] | undefined;
|
@@ -72,23 +70,35 @@ declare const cliParamsPush: import("zod").ZodObject<{
|
|
72
70
|
password?: string | undefined;
|
73
71
|
database?: string | undefined;
|
74
72
|
connectionString?: string | undefined;
|
75
|
-
authToken?: string | undefined;
|
76
|
-
ssl?: string | undefined;
|
77
73
|
uri?: string | undefined;
|
74
|
+
ssl?: string | undefined;
|
75
|
+
authToken?: string | undefined;
|
78
76
|
}>;
|
79
77
|
export type CliParamsPush = TypeOf<typeof cliParamsPush>;
|
80
|
-
export declare const
|
78
|
+
export declare const configCheck: import("zod").ZodObject<{
|
79
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
81
80
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
82
|
-
|
83
|
-
|
84
|
-
}, "strict", import("zod").ZodTypeAny, {
|
81
|
+
}, "strip", import("zod").ZodTypeAny, {
|
82
|
+
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
85
83
|
out?: string | undefined;
|
86
|
-
config?: string | undefined;
|
87
|
-
driver?: string | undefined;
|
88
84
|
}, {
|
85
|
+
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
89
86
|
out?: string | undefined;
|
90
|
-
config?: string | undefined;
|
91
|
-
driver?: string | undefined;
|
92
87
|
}>;
|
93
|
-
export
|
94
|
-
|
88
|
+
export declare const cliConfigCheck: import("zod").ZodIntersection<import("zod").ZodObject<{
|
89
|
+
config: import("zod").ZodOptional<import("zod").ZodString>;
|
90
|
+
}, "strip", import("zod").ZodTypeAny, {
|
91
|
+
config?: string | undefined;
|
92
|
+
}, {
|
93
|
+
config?: string | undefined;
|
94
|
+
}>, import("zod").ZodObject<{
|
95
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
96
|
+
out: import("zod").ZodOptional<import("zod").ZodString>;
|
97
|
+
}, "strip", import("zod").ZodTypeAny, {
|
98
|
+
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
99
|
+
out?: string | undefined;
|
100
|
+
}, {
|
101
|
+
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
102
|
+
out?: string | undefined;
|
103
|
+
}>>;
|
104
|
+
export type CliCheckConfig = TypeOf<typeof cliConfigCheck>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TypeOf } from "zod";
|
2
|
-
export type Commands = "introspect:sqlite" | "introspect:pg" | "generate" | "check
|
2
|
+
export type Commands = "introspect:sqlite" | "introspect:pg" | "generate" | "check" | "up" | "drop" | "introspect:mysql" | "push";
|
3
3
|
/**
|
4
4
|
* This function checks an input from a user and if there are any params together with config path - return true
|
5
5
|
* @param options - user input
|
package/global.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
export declare const originUUID = "00000000-0000-0000-0000-000000000000";
|
2
|
-
export declare const snapshotVersion = "
|
2
|
+
export declare const snapshotVersion = "6";
|
3
3
|
export declare function assertUnreachable(x: never): never;
|
4
4
|
export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
|
package/index.js
CHANGED
package/introspect-pg.d.ts
CHANGED
@@ -3,7 +3,10 @@ import { Relation, Relations } from "drizzle-orm/relations";
|
|
3
3
|
import "./@types/utils";
|
4
4
|
import type { ConfigIntrospectCasing } from "./cli/validations/common";
|
5
5
|
import { PgSchemaInternal } from "./serializer/pgSchema";
|
6
|
-
export declare const
|
6
|
+
export declare const relationsToTypeScriptForStudio: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
|
7
|
+
export declare const relationsToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
|
8
|
+
file: string;
|
9
|
+
};
|
7
10
|
export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
|
8
11
|
file: string;
|
9
12
|
imports: string;
|
package/jsonStatements.d.ts
CHANGED
@@ -294,7 +294,7 @@ export interface JsonRenameSchema {
|
|
294
294
|
export type JsonAlterColumnStatement = JsonRenameColumnStatement | JsonAlterColumnTypeStatement | JsonAlterColumnSetDefaultStatement | JsonAlterColumnDropDefaultStatement | JsonAlterColumnSetNotNullStatement | JsonAlterColumnDropNotNullStatement | JsonAlterColumnDropOnUpdateStatement | JsonAlterColumnSetOnUpdateStatement | JsonAlterColumnDropAutoincrementStatement | JsonAlterColumnSetAutoincrementStatement | JsonAlterColumnSetPrimaryKeyStatement | JsonAlterColumnDropPrimaryKeyStatement;
|
295
295
|
export type JsonStatement = JsonAlterColumnStatement | JsonCreateTableStatement | JsonDropTableStatement | JsonRenameTableStatement | JsonCreateEnumStatement | JsonAddValueToEnumStatement | JsonDropColumnStatement | JsonAddColumnStatement | JsonCreateIndexStatement | JsonCreateReferenceStatement | JsonAlterReferenceStatement | JsonDeleteReferenceStatement | JsonDropIndexStatement | JsonReferenceStatement | JsonSqliteCreateTableStatement | JsonSqliteAddColumnStatement | JsonCreateCompositePK | JsonDeleteCompositePK | JsonAlterCompositePK | JsonCreateUniqueConstraint | JsonDeleteUniqueConstraint | JsonAlterUniqueConstraint | JsonCreateSchema | JsonDropSchema | JsonRenameSchema | JsonAlterTableSetSchema | JsonAlterTableRemoveFromSchema | JsonAlterTableSetNewSchema;
|
296
296
|
export declare const preparePgCreateTableJson: (table: Table, json2: PgSchema) => JsonCreateTableStatement;
|
297
|
-
export declare const prepareMySqlCreateTableJson: (table: Table, json2:
|
297
|
+
export declare const prepareMySqlCreateTableJson: (table: Table, json2: MySqlSchema) => JsonCreateTableStatement;
|
298
298
|
export declare const prepareSQLiteCreateTable: (table: Table) => JsonSqliteCreateTableStatement;
|
299
299
|
export declare const prepareDropTableJson: (table: Table) => JsonDropTableStatement;
|
300
300
|
export declare const prepareRenameTableJson: (tableFrom: Table, tableTo: Table) => JsonRenameTableStatement;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.14-
|
3
|
+
"version": "0.20.14-c82ab68",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -68,6 +68,7 @@
|
|
68
68
|
"hanji": "^0.0.5",
|
69
69
|
"json-diff": "0.9.0",
|
70
70
|
"minimatch": "^7.4.3",
|
71
|
+
"pluralize": "^8.0.0",
|
71
72
|
"semver": "^7.5.4",
|
72
73
|
"zod": "^3.20.2"
|
73
74
|
},
|
@@ -80,6 +81,7 @@
|
|
80
81
|
"@types/minimatch": "^5.1.2",
|
81
82
|
"@types/node": "^18.11.15",
|
82
83
|
"@types/pg": "^8.10.7",
|
84
|
+
"@types/pluralize": "^0.0.33",
|
83
85
|
"@types/semver": "^7.5.5",
|
84
86
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
85
87
|
"@typescript-eslint/parser": "^5.46.1",
|