drizzle-kit 0.20.18 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +104694 -56732
- package/index.d.mts +232 -68
- package/index.d.ts +232 -68
- package/index.js +1 -0
- package/package.json +44 -72
- package/payload.d.mts +1052 -18
- package/payload.d.ts +1052 -18
- package/payload.js +22129 -34534
- package/payload.mjs +22174 -34562
- package/utils-studio.js +4580 -805
- package/utils-studio.mjs +4556 -784
- package/utils.js +4410 -6940
- package/utils.mjs +4852 -7382
- package/@types/utils.d.ts +0 -12
- package/cli/commands/migrate.d.ts +0 -270
- package/cli/commands/mysqlIntrospect.d.ts +0 -119
- package/cli/commands/mysqlPushUtils.d.ts +0 -18
- package/cli/commands/mysqlUp.d.ts +0 -4
- package/cli/commands/pgConnect.d.ts +0 -5
- package/cli/commands/pgIntrospect.d.ts +0 -123
- package/cli/commands/pgPushUtils.d.ts +0 -14
- package/cli/commands/pgUp.d.ts +0 -4
- package/cli/commands/sqliteIntrospect.d.ts +0 -107
- package/cli/commands/sqlitePushUtils.d.ts +0 -21
- package/cli/commands/sqliteUtils.d.ts +0 -162
- package/cli/commands/upFolders.d.ts +0 -27
- package/cli/commands/utils.d.ts +0 -274
- package/cli/selector-ui.d.ts +0 -13
- package/cli/validations/common.d.ts +0 -13
- package/cli/validations/mysql.d.ts +0 -365
- package/cli/validations/outputs.d.ts +0 -40
- package/cli/validations/pg.d.ts +0 -438
- package/cli/views.d.ts +0 -61
- package/drivers/index.d.ts +0 -39
- package/global.d.ts +0 -4
- package/introspect-mysql.d.ts +0 -9
- package/introspect-pg.d.ts +0 -12
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -76
- package/jsonStatements.d.ts +0 -349
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1313
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -11
- package/serializer/mysqlSchema.d.ts +0 -3833
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4333
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -9
- package/serializer/sqliteSchema.d.ts +0 -3227
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/snapshotsDiffer.d.ts +0 -2660
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -5
- package/utils-studio.d.ts +0 -5
- package/utils.d.ts +0 -199
package/sqlgenerator.d.ts
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
import { JsonCreateIndexStatement, JsonDropIndexStatement, JsonDropTableStatement, JsonRenameTableStatement, JsonSqliteAddColumnStatement, JsonSqliteCreateTableStatement, JsonStatement } from "./jsonStatements";
|
2
|
-
import { Dialect } from "./schemaValidator";
|
3
|
-
export declare const pgNativeTypes: Set<string>;
|
4
|
-
declare abstract class Convertor {
|
5
|
-
abstract can(statement: JsonStatement, dialect: Dialect): boolean;
|
6
|
-
abstract convert(statement: JsonStatement): string;
|
7
|
-
}
|
8
|
-
export declare class SQLiteCreateTableConvertor extends Convertor {
|
9
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
10
|
-
convert(st: JsonSqliteCreateTableStatement): string;
|
11
|
-
}
|
12
|
-
export declare class SQLiteDropTableConvertor extends Convertor {
|
13
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
14
|
-
convert(statement: JsonDropTableStatement): string;
|
15
|
-
}
|
16
|
-
export declare class SqliteRenameTableConvertor extends Convertor {
|
17
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
18
|
-
convert(statement: JsonRenameTableStatement): string;
|
19
|
-
}
|
20
|
-
export declare class SQLiteAlterTableAddColumnConvertor extends Convertor {
|
21
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
22
|
-
convert(statement: JsonSqliteAddColumnStatement): string;
|
23
|
-
}
|
24
|
-
export declare class CreateSqliteIndexConvertor extends Convertor {
|
25
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
26
|
-
convert(statement: JsonCreateIndexStatement): string;
|
27
|
-
}
|
28
|
-
export declare class SqliteDropIndexConvertor extends Convertor {
|
29
|
-
can(statement: JsonStatement, dialect: Dialect): boolean;
|
30
|
-
convert(statement: JsonDropIndexStatement): string;
|
31
|
-
}
|
32
|
-
export declare const fromJson: (statements: JsonStatement[], dialect: Dialect) => string[];
|
33
|
-
export {};
|
package/utils/words.d.ts
DELETED
package/utils-studio.d.mts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
|
2
|
-
export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
|
3
|
-
export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
|
4
|
-
export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
|
5
|
-
export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
|
package/utils-studio.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
|
2
|
-
export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
|
3
|
-
export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
|
4
|
-
export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
|
5
|
-
export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
|
package/utils.d.ts
DELETED
@@ -1,199 +0,0 @@
|
|
1
|
-
import type { Dialect } from "./schemaValidator";
|
2
|
-
import { NamedWithSchema } from "./cli/commands/migrate";
|
3
|
-
export declare const assertV1OutFolder: (out: string, dialect: Dialect | "{dialect}") => void;
|
4
|
-
export type Journal = {
|
5
|
-
version: string;
|
6
|
-
dialect: Dialect;
|
7
|
-
entries: {
|
8
|
-
idx: number;
|
9
|
-
version: string;
|
10
|
-
when: number;
|
11
|
-
tag: string;
|
12
|
-
breakpoints: boolean;
|
13
|
-
}[];
|
14
|
-
};
|
15
|
-
export declare const dryJournal: (dialect: Dialect) => Journal;
|
16
|
-
export declare const snapshotsPriorV4: (out: string) => string[];
|
17
|
-
export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
|
18
|
-
meta: string;
|
19
|
-
snapshots: string[];
|
20
|
-
journal: any;
|
21
|
-
};
|
22
|
-
export declare const validateWithReport: (snapshots: string[], dialect: Dialect) => {
|
23
|
-
malformed: string[];
|
24
|
-
nonLatest: string[];
|
25
|
-
idsMap: Record<string, {
|
26
|
-
parent: string;
|
27
|
-
snapshots: string[];
|
28
|
-
}>;
|
29
|
-
rawMap: Record<string, any>;
|
30
|
-
};
|
31
|
-
export declare const prepareMigrationFolder: (outFolder: string | undefined, dialect: Dialect) => {
|
32
|
-
snapshots: string[];
|
33
|
-
journal: any;
|
34
|
-
};
|
35
|
-
export declare const prepareMigrationMeta: (schemas: {
|
36
|
-
from: string;
|
37
|
-
to: string;
|
38
|
-
}[], tables: {
|
39
|
-
from: NamedWithSchema;
|
40
|
-
to: NamedWithSchema;
|
41
|
-
}[], columns: {
|
42
|
-
from: {
|
43
|
-
table: string;
|
44
|
-
schema: string;
|
45
|
-
column: string;
|
46
|
-
};
|
47
|
-
to: {
|
48
|
-
table: string;
|
49
|
-
schema: string;
|
50
|
-
column: string;
|
51
|
-
};
|
52
|
-
}[]) => {
|
53
|
-
schemas: {};
|
54
|
-
tables: {};
|
55
|
-
columns: {};
|
56
|
-
};
|
57
|
-
export declare const schemaRenameKey: (it: string) => string;
|
58
|
-
export declare const tableRenameKey: (it: NamedWithSchema) => string;
|
59
|
-
export declare const columnRenameKey: (table: string, schema: string, column: string) => string;
|
60
|
-
export declare const kloudMeta: () => {
|
61
|
-
pg: number[];
|
62
|
-
mysql: number[];
|
63
|
-
sqlite: number[];
|
64
|
-
};
|
65
|
-
export declare const statementsForDiffs: (in1: any, in2: any) => Promise<{
|
66
|
-
left: {
|
67
|
-
internal?: {
|
68
|
-
tables: Record<string, {
|
69
|
-
columns: Record<string, {
|
70
|
-
isArray?: boolean | undefined;
|
71
|
-
dimensions?: number | undefined;
|
72
|
-
rawType?: string | undefined;
|
73
|
-
} | undefined>;
|
74
|
-
} | undefined>;
|
75
|
-
} | undefined;
|
76
|
-
id: string;
|
77
|
-
prevId: string;
|
78
|
-
version: "5";
|
79
|
-
dialect: "pg";
|
80
|
-
tables: Record<string, {
|
81
|
-
name: string;
|
82
|
-
columns: Record<string, {
|
83
|
-
isUnique?: any;
|
84
|
-
default?: any;
|
85
|
-
uniqueName?: string | undefined;
|
86
|
-
nullsNotDistinct?: boolean | undefined;
|
87
|
-
name: string;
|
88
|
-
type: string;
|
89
|
-
primaryKey: boolean;
|
90
|
-
notNull: boolean;
|
91
|
-
}>;
|
92
|
-
indexes: Record<string, {
|
93
|
-
name: string;
|
94
|
-
columns: string[];
|
95
|
-
isUnique: boolean;
|
96
|
-
}>;
|
97
|
-
foreignKeys: Record<string, {
|
98
|
-
onUpdate?: string | undefined;
|
99
|
-
onDelete?: string | undefined;
|
100
|
-
schemaTo?: string | undefined;
|
101
|
-
name: string;
|
102
|
-
tableFrom: string;
|
103
|
-
columnsFrom: string[];
|
104
|
-
tableTo: string;
|
105
|
-
columnsTo: string[];
|
106
|
-
}>;
|
107
|
-
schema: string;
|
108
|
-
compositePrimaryKeys: Record<string, {
|
109
|
-
name: string;
|
110
|
-
columns: string[];
|
111
|
-
}>;
|
112
|
-
uniqueConstraints: Record<string, {
|
113
|
-
name: string;
|
114
|
-
columns: string[];
|
115
|
-
nullsNotDistinct: boolean;
|
116
|
-
}>;
|
117
|
-
}>;
|
118
|
-
schemas: Record<string, string>;
|
119
|
-
_meta: {
|
120
|
-
columns: Record<string, string>;
|
121
|
-
tables: Record<string, string>;
|
122
|
-
schemas: Record<string, string>;
|
123
|
-
};
|
124
|
-
enums: Record<string, {
|
125
|
-
name: string;
|
126
|
-
values: Record<string, string>;
|
127
|
-
}>;
|
128
|
-
};
|
129
|
-
right: {
|
130
|
-
internal?: {
|
131
|
-
tables: Record<string, {
|
132
|
-
columns: Record<string, {
|
133
|
-
isArray?: boolean | undefined;
|
134
|
-
dimensions?: number | undefined;
|
135
|
-
rawType?: string | undefined;
|
136
|
-
} | undefined>;
|
137
|
-
} | undefined>;
|
138
|
-
} | undefined;
|
139
|
-
id: string;
|
140
|
-
prevId: string;
|
141
|
-
version: "5";
|
142
|
-
dialect: "pg";
|
143
|
-
tables: Record<string, {
|
144
|
-
name: string;
|
145
|
-
columns: Record<string, {
|
146
|
-
isUnique?: any;
|
147
|
-
default?: any;
|
148
|
-
uniqueName?: string | undefined;
|
149
|
-
nullsNotDistinct?: boolean | undefined;
|
150
|
-
name: string;
|
151
|
-
type: string;
|
152
|
-
primaryKey: boolean;
|
153
|
-
notNull: boolean;
|
154
|
-
}>;
|
155
|
-
indexes: Record<string, {
|
156
|
-
name: string;
|
157
|
-
columns: string[];
|
158
|
-
isUnique: boolean;
|
159
|
-
}>;
|
160
|
-
foreignKeys: Record<string, {
|
161
|
-
onUpdate?: string | undefined;
|
162
|
-
onDelete?: string | undefined;
|
163
|
-
schemaTo?: string | undefined;
|
164
|
-
name: string;
|
165
|
-
tableFrom: string;
|
166
|
-
columnsFrom: string[];
|
167
|
-
tableTo: string;
|
168
|
-
columnsTo: string[];
|
169
|
-
}>;
|
170
|
-
schema: string;
|
171
|
-
compositePrimaryKeys: Record<string, {
|
172
|
-
name: string;
|
173
|
-
columns: string[];
|
174
|
-
}>;
|
175
|
-
uniqueConstraints: Record<string, {
|
176
|
-
name: string;
|
177
|
-
columns: string[];
|
178
|
-
nullsNotDistinct: boolean;
|
179
|
-
}>;
|
180
|
-
}>;
|
181
|
-
schemas: Record<string, string>;
|
182
|
-
_meta: {
|
183
|
-
columns: Record<string, string>;
|
184
|
-
tables: Record<string, string>;
|
185
|
-
schemas: Record<string, string>;
|
186
|
-
};
|
187
|
-
enums: Record<string, {
|
188
|
-
name: string;
|
189
|
-
values: Record<string, string>;
|
190
|
-
}>;
|
191
|
-
};
|
192
|
-
statements: import("./jsonStatements").JsonStatement[];
|
193
|
-
sqlStatements: string[];
|
194
|
-
_meta: {
|
195
|
-
schemas: {};
|
196
|
-
tables: {};
|
197
|
-
columns: {};
|
198
|
-
} | undefined;
|
199
|
-
}>;
|