drizzle-kit 0.27.2 → 0.28.0-bc6e8f5
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- package/api.d.mts +3 -2
- package/api.d.ts +3 -2
- package/api.js +267 -202
- package/api.mjs +267 -202
- package/bin.cjs +47621 -47561
- package/index-BfiZoTqG.d.mts +293 -0
- package/index-BfiZoTqG.d.ts +293 -0
- package/index.d.mts +2 -287
- package/index.d.ts +2 -287
- package/package.json +4 -1
- package/utils.js +11 -0
- package/utils.mjs +9 -0
- package/common-DYjgLS6u.d.mts +0 -8
- package/common-DYjgLS6u.d.ts +0 -8
@@ -0,0 +1,293 @@
|
|
1
|
+
import { ConnectionOptions } from 'tls';
|
2
|
+
|
3
|
+
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
4
|
+
type Prefix = (typeof prefixes)[number];
|
5
|
+
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
6
|
+
type CasingType = (typeof casingTypes)[number];
|
7
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite"];
|
8
|
+
type Driver = (typeof drivers)[number];
|
9
|
+
|
10
|
+
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
|
11
|
+
type Dialect = (typeof dialects)[number];
|
12
|
+
|
13
|
+
type SslOptions = {
|
14
|
+
pfx?: string;
|
15
|
+
key?: string;
|
16
|
+
passphrase?: string;
|
17
|
+
cert?: string;
|
18
|
+
ca?: string | string[];
|
19
|
+
crl?: string | string[];
|
20
|
+
ciphers?: string;
|
21
|
+
rejectUnauthorized?: boolean;
|
22
|
+
};
|
23
|
+
type Verify<T, U extends T> = U;
|
24
|
+
/**
|
25
|
+
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
26
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
27
|
+
*
|
28
|
+
* **Config** usage:
|
29
|
+
*
|
30
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
31
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`
|
32
|
+
*
|
33
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
34
|
+
*
|
35
|
+
* ---
|
36
|
+
* `schema` - param lets you define where your schema file/files live.
|
37
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
38
|
+
*
|
39
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
40
|
+
*
|
41
|
+
* ---
|
42
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
43
|
+
*
|
44
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
45
|
+
*
|
46
|
+
* ---
|
47
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
48
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
49
|
+
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
50
|
+
*
|
51
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
52
|
+
*
|
53
|
+
* ---
|
54
|
+
*
|
55
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
56
|
+
*
|
57
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
58
|
+
*
|
59
|
+
* ---
|
60
|
+
*
|
61
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
62
|
+
* By default, all information about executed migrations will be stored in the database inside
|
63
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
64
|
+
* However, you can configure where to store those records.
|
65
|
+
*
|
66
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
67
|
+
*
|
68
|
+
* ---
|
69
|
+
*
|
70
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
71
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
72
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
|
73
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
74
|
+
*
|
75
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
76
|
+
*
|
77
|
+
* ---
|
78
|
+
*
|
79
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
80
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
81
|
+
*
|
82
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
83
|
+
*
|
84
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
85
|
+
*
|
86
|
+
* ---
|
87
|
+
*
|
88
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
89
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
90
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
91
|
+
* but you can add any schema you need.
|
92
|
+
*
|
93
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
94
|
+
* drizzle schema that are a part of the my_schema schema.
|
95
|
+
*
|
96
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
97
|
+
*
|
98
|
+
* ---
|
99
|
+
*
|
100
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
101
|
+
*
|
102
|
+
* > Note: This command will only print the statements that should be executed.
|
103
|
+
* To approve them before applying, please refer to the `strict` command.
|
104
|
+
*
|
105
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
106
|
+
*
|
107
|
+
* ---
|
108
|
+
*
|
109
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
110
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
111
|
+
*
|
112
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
113
|
+
*/
|
114
|
+
type Config = {
|
115
|
+
dialect: Dialect;
|
116
|
+
out?: string;
|
117
|
+
breakpoints?: boolean;
|
118
|
+
tablesFilter?: string | string[];
|
119
|
+
extensionsFilters?: 'postgis'[];
|
120
|
+
schemaFilter?: string | string[];
|
121
|
+
schema?: string | string[];
|
122
|
+
verbose?: boolean;
|
123
|
+
strict?: boolean;
|
124
|
+
casing?: 'camelCase' | 'snake_case';
|
125
|
+
migrations?: {
|
126
|
+
table?: string;
|
127
|
+
schema?: string;
|
128
|
+
prefix?: Prefix;
|
129
|
+
};
|
130
|
+
introspect?: {
|
131
|
+
casing: 'camel' | 'preserve';
|
132
|
+
};
|
133
|
+
entities?: {
|
134
|
+
roles?: boolean | {
|
135
|
+
provider?: 'supabase' | 'neon' | string & {};
|
136
|
+
exclude?: string[];
|
137
|
+
include?: string[];
|
138
|
+
};
|
139
|
+
};
|
140
|
+
} & ({
|
141
|
+
dialect: Verify<Dialect, 'turso'>;
|
142
|
+
dbCredentials: {
|
143
|
+
url: string;
|
144
|
+
authToken?: string;
|
145
|
+
};
|
146
|
+
} | {
|
147
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
148
|
+
dbCredentials: {
|
149
|
+
url: string;
|
150
|
+
};
|
151
|
+
} | {
|
152
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
153
|
+
dbCredentials: ({
|
154
|
+
host: string;
|
155
|
+
port?: number;
|
156
|
+
user?: string;
|
157
|
+
password?: string;
|
158
|
+
database: string;
|
159
|
+
ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
|
160
|
+
} & {}) | {
|
161
|
+
url: string;
|
162
|
+
};
|
163
|
+
} | {
|
164
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
165
|
+
driver: Verify<Driver, 'aws-data-api'>;
|
166
|
+
dbCredentials: {
|
167
|
+
database: string;
|
168
|
+
secretArn: string;
|
169
|
+
resourceArn: string;
|
170
|
+
};
|
171
|
+
} | {
|
172
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
173
|
+
driver: Verify<Driver, 'pglite'>;
|
174
|
+
dbCredentials: {
|
175
|
+
url: string;
|
176
|
+
};
|
177
|
+
} | {
|
178
|
+
dialect: Verify<Dialect, 'mysql'>;
|
179
|
+
dbCredentials: {
|
180
|
+
host: string;
|
181
|
+
port?: number;
|
182
|
+
user?: string;
|
183
|
+
password?: string;
|
184
|
+
database: string;
|
185
|
+
ssl?: string | SslOptions;
|
186
|
+
} | {
|
187
|
+
url: string;
|
188
|
+
};
|
189
|
+
} | {
|
190
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
191
|
+
driver: Verify<Driver, 'd1-http'>;
|
192
|
+
dbCredentials: {
|
193
|
+
accountId: string;
|
194
|
+
databaseId: string;
|
195
|
+
token: string;
|
196
|
+
};
|
197
|
+
} | {
|
198
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
199
|
+
driver: Verify<Driver, 'expo'>;
|
200
|
+
} | {});
|
201
|
+
/**
|
202
|
+
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
203
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
204
|
+
*
|
205
|
+
* **Config** usage:
|
206
|
+
*
|
207
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
208
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`
|
209
|
+
*
|
210
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
211
|
+
*
|
212
|
+
* ---
|
213
|
+
* `schema` - param lets you define where your schema file/files live.
|
214
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
215
|
+
*
|
216
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
217
|
+
*
|
218
|
+
* ---
|
219
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
220
|
+
*
|
221
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
222
|
+
*
|
223
|
+
* ---
|
224
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
225
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
226
|
+
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
227
|
+
*
|
228
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
229
|
+
*
|
230
|
+
* ---
|
231
|
+
*
|
232
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
233
|
+
*
|
234
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
235
|
+
*
|
236
|
+
* ---
|
237
|
+
*
|
238
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
239
|
+
* By default, all information about executed migrations will be stored in the database inside
|
240
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
241
|
+
* However, you can configure where to store those records.
|
242
|
+
*
|
243
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
244
|
+
*
|
245
|
+
* ---
|
246
|
+
*
|
247
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
248
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
249
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
|
250
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
251
|
+
*
|
252
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
253
|
+
*
|
254
|
+
* ---
|
255
|
+
*
|
256
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
257
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
258
|
+
*
|
259
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
260
|
+
*
|
261
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
262
|
+
*
|
263
|
+
* ---
|
264
|
+
*
|
265
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
266
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
267
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
268
|
+
* but you can add any schema you need.
|
269
|
+
*
|
270
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
271
|
+
* drizzle schema that are a part of the my_schema schema.
|
272
|
+
*
|
273
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
274
|
+
*
|
275
|
+
* ---
|
276
|
+
*
|
277
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
278
|
+
*
|
279
|
+
* > Note: This command will only print the statements that should be executed.
|
280
|
+
* To approve them before applying, please refer to the `strict` command.
|
281
|
+
*
|
282
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
283
|
+
*
|
284
|
+
* ---
|
285
|
+
*
|
286
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
287
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
288
|
+
*
|
289
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
290
|
+
*/
|
291
|
+
declare function defineConfig(config: Config): Config;
|
292
|
+
|
293
|
+
export { type CasingType as C, type Config as a, defineConfig as d };
|
@@ -0,0 +1,293 @@
|
|
1
|
+
import { ConnectionOptions } from 'tls';
|
2
|
+
|
3
|
+
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
4
|
+
type Prefix = (typeof prefixes)[number];
|
5
|
+
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
6
|
+
type CasingType = (typeof casingTypes)[number];
|
7
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite"];
|
8
|
+
type Driver = (typeof drivers)[number];
|
9
|
+
|
10
|
+
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
|
11
|
+
type Dialect = (typeof dialects)[number];
|
12
|
+
|
13
|
+
type SslOptions = {
|
14
|
+
pfx?: string;
|
15
|
+
key?: string;
|
16
|
+
passphrase?: string;
|
17
|
+
cert?: string;
|
18
|
+
ca?: string | string[];
|
19
|
+
crl?: string | string[];
|
20
|
+
ciphers?: string;
|
21
|
+
rejectUnauthorized?: boolean;
|
22
|
+
};
|
23
|
+
type Verify<T, U extends T> = U;
|
24
|
+
/**
|
25
|
+
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
26
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
27
|
+
*
|
28
|
+
* **Config** usage:
|
29
|
+
*
|
30
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
31
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`
|
32
|
+
*
|
33
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
34
|
+
*
|
35
|
+
* ---
|
36
|
+
* `schema` - param lets you define where your schema file/files live.
|
37
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
38
|
+
*
|
39
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
40
|
+
*
|
41
|
+
* ---
|
42
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
43
|
+
*
|
44
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
45
|
+
*
|
46
|
+
* ---
|
47
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
48
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
49
|
+
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
50
|
+
*
|
51
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
52
|
+
*
|
53
|
+
* ---
|
54
|
+
*
|
55
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
56
|
+
*
|
57
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
58
|
+
*
|
59
|
+
* ---
|
60
|
+
*
|
61
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
62
|
+
* By default, all information about executed migrations will be stored in the database inside
|
63
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
64
|
+
* However, you can configure where to store those records.
|
65
|
+
*
|
66
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
67
|
+
*
|
68
|
+
* ---
|
69
|
+
*
|
70
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
71
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
72
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
|
73
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
74
|
+
*
|
75
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
76
|
+
*
|
77
|
+
* ---
|
78
|
+
*
|
79
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
80
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
81
|
+
*
|
82
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
83
|
+
*
|
84
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
85
|
+
*
|
86
|
+
* ---
|
87
|
+
*
|
88
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
89
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
90
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
91
|
+
* but you can add any schema you need.
|
92
|
+
*
|
93
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
94
|
+
* drizzle schema that are a part of the my_schema schema.
|
95
|
+
*
|
96
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
97
|
+
*
|
98
|
+
* ---
|
99
|
+
*
|
100
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
101
|
+
*
|
102
|
+
* > Note: This command will only print the statements that should be executed.
|
103
|
+
* To approve them before applying, please refer to the `strict` command.
|
104
|
+
*
|
105
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
106
|
+
*
|
107
|
+
* ---
|
108
|
+
*
|
109
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
110
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
111
|
+
*
|
112
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
113
|
+
*/
|
114
|
+
type Config = {
|
115
|
+
dialect: Dialect;
|
116
|
+
out?: string;
|
117
|
+
breakpoints?: boolean;
|
118
|
+
tablesFilter?: string | string[];
|
119
|
+
extensionsFilters?: 'postgis'[];
|
120
|
+
schemaFilter?: string | string[];
|
121
|
+
schema?: string | string[];
|
122
|
+
verbose?: boolean;
|
123
|
+
strict?: boolean;
|
124
|
+
casing?: 'camelCase' | 'snake_case';
|
125
|
+
migrations?: {
|
126
|
+
table?: string;
|
127
|
+
schema?: string;
|
128
|
+
prefix?: Prefix;
|
129
|
+
};
|
130
|
+
introspect?: {
|
131
|
+
casing: 'camel' | 'preserve';
|
132
|
+
};
|
133
|
+
entities?: {
|
134
|
+
roles?: boolean | {
|
135
|
+
provider?: 'supabase' | 'neon' | string & {};
|
136
|
+
exclude?: string[];
|
137
|
+
include?: string[];
|
138
|
+
};
|
139
|
+
};
|
140
|
+
} & ({
|
141
|
+
dialect: Verify<Dialect, 'turso'>;
|
142
|
+
dbCredentials: {
|
143
|
+
url: string;
|
144
|
+
authToken?: string;
|
145
|
+
};
|
146
|
+
} | {
|
147
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
148
|
+
dbCredentials: {
|
149
|
+
url: string;
|
150
|
+
};
|
151
|
+
} | {
|
152
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
153
|
+
dbCredentials: ({
|
154
|
+
host: string;
|
155
|
+
port?: number;
|
156
|
+
user?: string;
|
157
|
+
password?: string;
|
158
|
+
database: string;
|
159
|
+
ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
|
160
|
+
} & {}) | {
|
161
|
+
url: string;
|
162
|
+
};
|
163
|
+
} | {
|
164
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
165
|
+
driver: Verify<Driver, 'aws-data-api'>;
|
166
|
+
dbCredentials: {
|
167
|
+
database: string;
|
168
|
+
secretArn: string;
|
169
|
+
resourceArn: string;
|
170
|
+
};
|
171
|
+
} | {
|
172
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
173
|
+
driver: Verify<Driver, 'pglite'>;
|
174
|
+
dbCredentials: {
|
175
|
+
url: string;
|
176
|
+
};
|
177
|
+
} | {
|
178
|
+
dialect: Verify<Dialect, 'mysql'>;
|
179
|
+
dbCredentials: {
|
180
|
+
host: string;
|
181
|
+
port?: number;
|
182
|
+
user?: string;
|
183
|
+
password?: string;
|
184
|
+
database: string;
|
185
|
+
ssl?: string | SslOptions;
|
186
|
+
} | {
|
187
|
+
url: string;
|
188
|
+
};
|
189
|
+
} | {
|
190
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
191
|
+
driver: Verify<Driver, 'd1-http'>;
|
192
|
+
dbCredentials: {
|
193
|
+
accountId: string;
|
194
|
+
databaseId: string;
|
195
|
+
token: string;
|
196
|
+
};
|
197
|
+
} | {
|
198
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
199
|
+
driver: Verify<Driver, 'expo'>;
|
200
|
+
} | {});
|
201
|
+
/**
|
202
|
+
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
203
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
204
|
+
*
|
205
|
+
* **Config** usage:
|
206
|
+
*
|
207
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
208
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`
|
209
|
+
*
|
210
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
211
|
+
*
|
212
|
+
* ---
|
213
|
+
* `schema` - param lets you define where your schema file/files live.
|
214
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
215
|
+
*
|
216
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
217
|
+
*
|
218
|
+
* ---
|
219
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
220
|
+
*
|
221
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
222
|
+
*
|
223
|
+
* ---
|
224
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
225
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
226
|
+
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
227
|
+
*
|
228
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
229
|
+
*
|
230
|
+
* ---
|
231
|
+
*
|
232
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
233
|
+
*
|
234
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
235
|
+
*
|
236
|
+
* ---
|
237
|
+
*
|
238
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
239
|
+
* By default, all information about executed migrations will be stored in the database inside
|
240
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
241
|
+
* However, you can configure where to store those records.
|
242
|
+
*
|
243
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
244
|
+
*
|
245
|
+
* ---
|
246
|
+
*
|
247
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
248
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
249
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
|
250
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
251
|
+
*
|
252
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
253
|
+
*
|
254
|
+
* ---
|
255
|
+
*
|
256
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
257
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
258
|
+
*
|
259
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
260
|
+
*
|
261
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
262
|
+
*
|
263
|
+
* ---
|
264
|
+
*
|
265
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
266
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
267
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
268
|
+
* but you can add any schema you need.
|
269
|
+
*
|
270
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
271
|
+
* drizzle schema that are a part of the my_schema schema.
|
272
|
+
*
|
273
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
274
|
+
*
|
275
|
+
* ---
|
276
|
+
*
|
277
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
278
|
+
*
|
279
|
+
* > Note: This command will only print the statements that should be executed.
|
280
|
+
* To approve them before applying, please refer to the `strict` command.
|
281
|
+
*
|
282
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
283
|
+
*
|
284
|
+
* ---
|
285
|
+
*
|
286
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
287
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
288
|
+
*
|
289
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
290
|
+
*/
|
291
|
+
declare function defineConfig(config: Config): Config;
|
292
|
+
|
293
|
+
export { type CasingType as C, type Config as a, defineConfig as d };
|