drizzle-kit 1.0.0-beta.1-f77460a → 1.0.0-beta.1-27d2721
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/api.d.mts +233 -7
- package/api.d.ts +233 -7
- package/api.js +13 -14
- package/api.mjs +10 -10
- package/bin.cjs +1 -1
- package/index.d.mts +319 -2
- package/index.d.ts +319 -2
- package/package.json +1 -1
- package/index-BAUrj6Ib.d.mts +0 -321
- package/index-BAUrj6Ib.d.ts +0 -321
package/api.d.mts
CHANGED
|
@@ -3,10 +3,16 @@ import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
|
3
3
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
4
4
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
|
5
5
|
import { SingleStoreDriverDatabase } from 'drizzle-orm/singlestore';
|
|
6
|
-
import { C as CasingType, a as Config } from './index-BAUrj6Ib.mjs';
|
|
7
6
|
import * as zod from 'zod';
|
|
8
7
|
import { TypeOf } from 'zod';
|
|
9
|
-
import 'tls';
|
|
8
|
+
import { ConnectionOptions } from 'tls';
|
|
9
|
+
|
|
10
|
+
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
|
11
|
+
type Prefix = (typeof prefixes)[number];
|
|
12
|
+
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
|
13
|
+
type CasingType = (typeof casingTypes)[number];
|
|
14
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
|
15
|
+
type Driver = (typeof drivers)[number];
|
|
10
16
|
|
|
11
17
|
declare const mysqlCredentials: zod.ZodUnion<[zod.ZodObject<{
|
|
12
18
|
host: zod.ZodString;
|
|
@@ -248,6 +254,226 @@ type SqliteCredentials = {
|
|
|
248
254
|
url: string;
|
|
249
255
|
};
|
|
250
256
|
|
|
257
|
+
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso", "singlestore", "gel"];
|
|
258
|
+
type Dialect = (typeof dialects)[number];
|
|
259
|
+
|
|
260
|
+
type SslOptions = {
|
|
261
|
+
pfx?: string;
|
|
262
|
+
key?: string;
|
|
263
|
+
passphrase?: string;
|
|
264
|
+
cert?: string;
|
|
265
|
+
ca?: string | string[];
|
|
266
|
+
crl?: string | string[];
|
|
267
|
+
ciphers?: string;
|
|
268
|
+
rejectUnauthorized?: boolean;
|
|
269
|
+
};
|
|
270
|
+
type Verify<T, U extends T> = U;
|
|
271
|
+
/**
|
|
272
|
+
* **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
|
|
273
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
|
274
|
+
*
|
|
275
|
+
* **Config** usage:
|
|
276
|
+
*
|
|
277
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
|
278
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore
|
|
279
|
+
*
|
|
280
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
|
281
|
+
*
|
|
282
|
+
* ---
|
|
283
|
+
* `schema` - param lets you define where your schema file/files live.
|
|
284
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
|
285
|
+
*
|
|
286
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
|
287
|
+
*
|
|
288
|
+
* ---
|
|
289
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
|
290
|
+
*
|
|
291
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
|
292
|
+
*
|
|
293
|
+
* ---
|
|
294
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
|
295
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
|
296
|
+
* 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
|
|
297
|
+
*
|
|
298
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
|
299
|
+
*
|
|
300
|
+
* ---
|
|
301
|
+
*
|
|
302
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
|
303
|
+
*
|
|
304
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
|
305
|
+
*
|
|
306
|
+
* ---
|
|
307
|
+
*
|
|
308
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
|
309
|
+
* By default, all information about executed migrations will be stored in the database inside
|
|
310
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
|
311
|
+
* However, you can configure where to store those records.
|
|
312
|
+
*
|
|
313
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
|
314
|
+
*
|
|
315
|
+
* ---
|
|
316
|
+
*
|
|
317
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
|
318
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
|
319
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
|
|
320
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
|
321
|
+
*
|
|
322
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
|
323
|
+
*
|
|
324
|
+
* ---
|
|
325
|
+
*
|
|
326
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
|
327
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
|
328
|
+
*
|
|
329
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
|
330
|
+
*
|
|
331
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
|
332
|
+
*
|
|
333
|
+
* ---
|
|
334
|
+
*
|
|
335
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
|
336
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
|
337
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
|
338
|
+
* but you can add any schema you need.
|
|
339
|
+
*
|
|
340
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
|
341
|
+
* drizzle schema that are a part of the my_schema schema.
|
|
342
|
+
*
|
|
343
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
|
344
|
+
*
|
|
345
|
+
* ---
|
|
346
|
+
*
|
|
347
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
|
348
|
+
*
|
|
349
|
+
* > Note: This command will only print the statements that should be executed.
|
|
350
|
+
* To approve them before applying, please refer to the `strict` command.
|
|
351
|
+
*
|
|
352
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
|
353
|
+
*
|
|
354
|
+
* ---
|
|
355
|
+
*
|
|
356
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
|
357
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
|
358
|
+
*
|
|
359
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
|
360
|
+
*/
|
|
361
|
+
type Config = {
|
|
362
|
+
dialect: Dialect;
|
|
363
|
+
out?: string;
|
|
364
|
+
breakpoints?: boolean;
|
|
365
|
+
tablesFilter?: string | string[];
|
|
366
|
+
extensionsFilters?: 'postgis'[];
|
|
367
|
+
schemaFilter?: string | string[];
|
|
368
|
+
schema?: string | string[];
|
|
369
|
+
verbose?: boolean;
|
|
370
|
+
strict?: boolean;
|
|
371
|
+
casing?: 'camelCase' | 'snake_case';
|
|
372
|
+
migrations?: {
|
|
373
|
+
table?: string;
|
|
374
|
+
schema?: string;
|
|
375
|
+
prefix?: Prefix;
|
|
376
|
+
};
|
|
377
|
+
introspect?: {
|
|
378
|
+
casing: 'camel' | 'preserve';
|
|
379
|
+
};
|
|
380
|
+
entities?: {
|
|
381
|
+
roles?: boolean | {
|
|
382
|
+
provider?: 'supabase' | 'neon' | string & {};
|
|
383
|
+
exclude?: string[];
|
|
384
|
+
include?: string[];
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
} & ({
|
|
388
|
+
dialect: Verify<Dialect, 'turso'>;
|
|
389
|
+
dbCredentials: {
|
|
390
|
+
url: string;
|
|
391
|
+
authToken?: string;
|
|
392
|
+
};
|
|
393
|
+
} | {
|
|
394
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
395
|
+
dbCredentials: {
|
|
396
|
+
url: string;
|
|
397
|
+
};
|
|
398
|
+
} | {
|
|
399
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
400
|
+
dbCredentials: ({
|
|
401
|
+
host: string;
|
|
402
|
+
port?: number;
|
|
403
|
+
user?: string;
|
|
404
|
+
password?: string;
|
|
405
|
+
database: string;
|
|
406
|
+
ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
|
|
407
|
+
} & {}) | {
|
|
408
|
+
url: string;
|
|
409
|
+
};
|
|
410
|
+
} | {
|
|
411
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
412
|
+
driver: Verify<Driver, 'aws-data-api'>;
|
|
413
|
+
dbCredentials: {
|
|
414
|
+
database: string;
|
|
415
|
+
secretArn: string;
|
|
416
|
+
resourceArn: string;
|
|
417
|
+
};
|
|
418
|
+
} | {
|
|
419
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
420
|
+
driver: Verify<Driver, 'pglite'>;
|
|
421
|
+
dbCredentials: {
|
|
422
|
+
url: string;
|
|
423
|
+
};
|
|
424
|
+
} | {
|
|
425
|
+
dialect: Verify<Dialect, 'mysql'>;
|
|
426
|
+
dbCredentials: {
|
|
427
|
+
host: string;
|
|
428
|
+
port?: number;
|
|
429
|
+
user?: string;
|
|
430
|
+
password?: string;
|
|
431
|
+
database: string;
|
|
432
|
+
ssl?: string | SslOptions;
|
|
433
|
+
} | {
|
|
434
|
+
url: string;
|
|
435
|
+
};
|
|
436
|
+
} | {
|
|
437
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
438
|
+
driver: Verify<Driver, 'd1-http'>;
|
|
439
|
+
dbCredentials: {
|
|
440
|
+
accountId: string;
|
|
441
|
+
databaseId: string;
|
|
442
|
+
token: string;
|
|
443
|
+
};
|
|
444
|
+
} | {
|
|
445
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
446
|
+
driver: Verify<Driver, 'expo'>;
|
|
447
|
+
} | {
|
|
448
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
449
|
+
driver: Verify<Driver, 'durable-sqlite'>;
|
|
450
|
+
} | {} | {
|
|
451
|
+
dialect: Verify<Dialect, 'singlestore'>;
|
|
452
|
+
dbCredentials: {
|
|
453
|
+
host: string;
|
|
454
|
+
port?: number;
|
|
455
|
+
user?: string;
|
|
456
|
+
password?: string;
|
|
457
|
+
database: string;
|
|
458
|
+
ssl?: string | SslOptions;
|
|
459
|
+
} | {
|
|
460
|
+
url: string;
|
|
461
|
+
};
|
|
462
|
+
} | {
|
|
463
|
+
dialect: Verify<Dialect, 'gel'>;
|
|
464
|
+
dbCredentials?: {
|
|
465
|
+
tlsSecurity?: 'insecure' | 'no_host_verification' | 'strict' | 'default';
|
|
466
|
+
} & ({
|
|
467
|
+
url: string;
|
|
468
|
+
} | ({
|
|
469
|
+
host: string;
|
|
470
|
+
port?: number;
|
|
471
|
+
user?: string;
|
|
472
|
+
password?: string;
|
|
473
|
+
database: string;
|
|
474
|
+
}));
|
|
475
|
+
});
|
|
476
|
+
|
|
251
477
|
declare const schema$2: zod.ZodObject<{
|
|
252
478
|
version: zod.ZodLiteral<"5">;
|
|
253
479
|
dialect: zod.ZodLiteral<"mysql">;
|
|
@@ -2868,7 +3094,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
|
|
|
2868
3094
|
statementsToExecute: string[];
|
|
2869
3095
|
apply: () => Promise<void>;
|
|
2870
3096
|
}>;
|
|
2871
|
-
declare const
|
|
3097
|
+
declare const startStudioPostgresServer: (imports: Record<string, unknown>, credentials: PostgresCredentials | {
|
|
2872
3098
|
driver: "pglite";
|
|
2873
3099
|
client: PGlite;
|
|
2874
3100
|
}, options?: {
|
|
@@ -2884,7 +3110,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
|
|
|
2884
3110
|
statementsToExecute: string[];
|
|
2885
3111
|
apply: () => Promise<void>;
|
|
2886
3112
|
}>;
|
|
2887
|
-
declare const
|
|
3113
|
+
declare const startStudioSQLiteServer: (imports: Record<string, unknown>, credentials: SqliteCredentials, options?: {
|
|
2888
3114
|
host?: string;
|
|
2889
3115
|
port?: number;
|
|
2890
3116
|
casing?: CasingType;
|
|
@@ -2897,7 +3123,7 @@ declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstanc
|
|
|
2897
3123
|
statementsToExecute: string[];
|
|
2898
3124
|
apply: () => Promise<void>;
|
|
2899
3125
|
}>;
|
|
2900
|
-
declare const
|
|
3126
|
+
declare const startStudioMySQLServer: (imports: Record<string, unknown>, credentials: MysqlCredentials, options?: {
|
|
2901
3127
|
host?: string;
|
|
2902
3128
|
port?: number;
|
|
2903
3129
|
casing?: CasingType;
|
|
@@ -2910,7 +3136,7 @@ declare const pushSingleStoreSchema: (imports: Record<string, unknown>, drizzleI
|
|
|
2910
3136
|
statementsToExecute: string[];
|
|
2911
3137
|
apply: () => Promise<void>;
|
|
2912
3138
|
}>;
|
|
2913
|
-
declare const
|
|
3139
|
+
declare const startStudioSingleStoreServer: (imports: Record<string, unknown>, credentials: SingleStoreCredentials, options?: {
|
|
2914
3140
|
host?: string;
|
|
2915
3141
|
port?: number;
|
|
2916
3142
|
casing?: CasingType;
|
|
@@ -3107,4 +3333,4 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
|
3107
3333
|
} | undefined;
|
|
3108
3334
|
} | Record<string, unknown>;
|
|
3109
3335
|
|
|
3110
|
-
export { type DrizzleMySQLSnapshotJSON, type DrizzleSQLiteSnapshotJSON, type DrizzleSingleStoreSnapshotJSON, type DrizzleSnapshotJSON, generateDrizzleJson, generateMigration, generateMySQLDrizzleJson, generateMySQLMigration, generateSQLiteDrizzleJson, generateSQLiteMigration, generateSingleStoreDrizzleJson, generateSingleStoreMigration, pushMySQLSchema, pushSQLiteSchema, pushSchema, pushSingleStoreSchema,
|
|
3336
|
+
export { type DrizzleMySQLSnapshotJSON, type DrizzleSQLiteSnapshotJSON, type DrizzleSingleStoreSnapshotJSON, type DrizzleSnapshotJSON, generateDrizzleJson, generateMigration, generateMySQLDrizzleJson, generateMySQLMigration, generateSQLiteDrizzleJson, generateSQLiteMigration, generateSingleStoreDrizzleJson, generateSingleStoreMigration, pushMySQLSchema, pushSQLiteSchema, pushSchema, pushSingleStoreSchema, startStudioMySQLServer, startStudioPostgresServer, startStudioSQLiteServer, startStudioSingleStoreServer, upPgSnapshot };
|
package/api.d.ts
CHANGED
|
@@ -3,10 +3,16 @@ import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
|
3
3
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
4
4
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
|
5
5
|
import { SingleStoreDriverDatabase } from 'drizzle-orm/singlestore';
|
|
6
|
-
import { C as CasingType, a as Config } from './index-BAUrj6Ib.js';
|
|
7
6
|
import * as zod from 'zod';
|
|
8
7
|
import { TypeOf } from 'zod';
|
|
9
|
-
import 'tls';
|
|
8
|
+
import { ConnectionOptions } from 'tls';
|
|
9
|
+
|
|
10
|
+
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
|
11
|
+
type Prefix = (typeof prefixes)[number];
|
|
12
|
+
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
|
13
|
+
type CasingType = (typeof casingTypes)[number];
|
|
14
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
|
15
|
+
type Driver = (typeof drivers)[number];
|
|
10
16
|
|
|
11
17
|
declare const mysqlCredentials: zod.ZodUnion<[zod.ZodObject<{
|
|
12
18
|
host: zod.ZodString;
|
|
@@ -248,6 +254,226 @@ type SqliteCredentials = {
|
|
|
248
254
|
url: string;
|
|
249
255
|
};
|
|
250
256
|
|
|
257
|
+
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso", "singlestore", "gel"];
|
|
258
|
+
type Dialect = (typeof dialects)[number];
|
|
259
|
+
|
|
260
|
+
type SslOptions = {
|
|
261
|
+
pfx?: string;
|
|
262
|
+
key?: string;
|
|
263
|
+
passphrase?: string;
|
|
264
|
+
cert?: string;
|
|
265
|
+
ca?: string | string[];
|
|
266
|
+
crl?: string | string[];
|
|
267
|
+
ciphers?: string;
|
|
268
|
+
rejectUnauthorized?: boolean;
|
|
269
|
+
};
|
|
270
|
+
type Verify<T, U extends T> = U;
|
|
271
|
+
/**
|
|
272
|
+
* **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
|
|
273
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
|
274
|
+
*
|
|
275
|
+
* **Config** usage:
|
|
276
|
+
*
|
|
277
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
|
278
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore
|
|
279
|
+
*
|
|
280
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
|
281
|
+
*
|
|
282
|
+
* ---
|
|
283
|
+
* `schema` - param lets you define where your schema file/files live.
|
|
284
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
|
285
|
+
*
|
|
286
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
|
287
|
+
*
|
|
288
|
+
* ---
|
|
289
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
|
290
|
+
*
|
|
291
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
|
292
|
+
*
|
|
293
|
+
* ---
|
|
294
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
|
295
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
|
296
|
+
* 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
|
|
297
|
+
*
|
|
298
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
|
299
|
+
*
|
|
300
|
+
* ---
|
|
301
|
+
*
|
|
302
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
|
303
|
+
*
|
|
304
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
|
305
|
+
*
|
|
306
|
+
* ---
|
|
307
|
+
*
|
|
308
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
|
309
|
+
* By default, all information about executed migrations will be stored in the database inside
|
|
310
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
|
311
|
+
* However, you can configure where to store those records.
|
|
312
|
+
*
|
|
313
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
|
314
|
+
*
|
|
315
|
+
* ---
|
|
316
|
+
*
|
|
317
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
|
318
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
|
319
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
|
|
320
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
|
321
|
+
*
|
|
322
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
|
323
|
+
*
|
|
324
|
+
* ---
|
|
325
|
+
*
|
|
326
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
|
327
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
|
328
|
+
*
|
|
329
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
|
330
|
+
*
|
|
331
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
|
332
|
+
*
|
|
333
|
+
* ---
|
|
334
|
+
*
|
|
335
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
|
336
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
|
337
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
|
338
|
+
* but you can add any schema you need.
|
|
339
|
+
*
|
|
340
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
|
341
|
+
* drizzle schema that are a part of the my_schema schema.
|
|
342
|
+
*
|
|
343
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
|
344
|
+
*
|
|
345
|
+
* ---
|
|
346
|
+
*
|
|
347
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
|
348
|
+
*
|
|
349
|
+
* > Note: This command will only print the statements that should be executed.
|
|
350
|
+
* To approve them before applying, please refer to the `strict` command.
|
|
351
|
+
*
|
|
352
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
|
353
|
+
*
|
|
354
|
+
* ---
|
|
355
|
+
*
|
|
356
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
|
357
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
|
358
|
+
*
|
|
359
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
|
360
|
+
*/
|
|
361
|
+
type Config = {
|
|
362
|
+
dialect: Dialect;
|
|
363
|
+
out?: string;
|
|
364
|
+
breakpoints?: boolean;
|
|
365
|
+
tablesFilter?: string | string[];
|
|
366
|
+
extensionsFilters?: 'postgis'[];
|
|
367
|
+
schemaFilter?: string | string[];
|
|
368
|
+
schema?: string | string[];
|
|
369
|
+
verbose?: boolean;
|
|
370
|
+
strict?: boolean;
|
|
371
|
+
casing?: 'camelCase' | 'snake_case';
|
|
372
|
+
migrations?: {
|
|
373
|
+
table?: string;
|
|
374
|
+
schema?: string;
|
|
375
|
+
prefix?: Prefix;
|
|
376
|
+
};
|
|
377
|
+
introspect?: {
|
|
378
|
+
casing: 'camel' | 'preserve';
|
|
379
|
+
};
|
|
380
|
+
entities?: {
|
|
381
|
+
roles?: boolean | {
|
|
382
|
+
provider?: 'supabase' | 'neon' | string & {};
|
|
383
|
+
exclude?: string[];
|
|
384
|
+
include?: string[];
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
} & ({
|
|
388
|
+
dialect: Verify<Dialect, 'turso'>;
|
|
389
|
+
dbCredentials: {
|
|
390
|
+
url: string;
|
|
391
|
+
authToken?: string;
|
|
392
|
+
};
|
|
393
|
+
} | {
|
|
394
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
395
|
+
dbCredentials: {
|
|
396
|
+
url: string;
|
|
397
|
+
};
|
|
398
|
+
} | {
|
|
399
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
400
|
+
dbCredentials: ({
|
|
401
|
+
host: string;
|
|
402
|
+
port?: number;
|
|
403
|
+
user?: string;
|
|
404
|
+
password?: string;
|
|
405
|
+
database: string;
|
|
406
|
+
ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
|
|
407
|
+
} & {}) | {
|
|
408
|
+
url: string;
|
|
409
|
+
};
|
|
410
|
+
} | {
|
|
411
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
412
|
+
driver: Verify<Driver, 'aws-data-api'>;
|
|
413
|
+
dbCredentials: {
|
|
414
|
+
database: string;
|
|
415
|
+
secretArn: string;
|
|
416
|
+
resourceArn: string;
|
|
417
|
+
};
|
|
418
|
+
} | {
|
|
419
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
420
|
+
driver: Verify<Driver, 'pglite'>;
|
|
421
|
+
dbCredentials: {
|
|
422
|
+
url: string;
|
|
423
|
+
};
|
|
424
|
+
} | {
|
|
425
|
+
dialect: Verify<Dialect, 'mysql'>;
|
|
426
|
+
dbCredentials: {
|
|
427
|
+
host: string;
|
|
428
|
+
port?: number;
|
|
429
|
+
user?: string;
|
|
430
|
+
password?: string;
|
|
431
|
+
database: string;
|
|
432
|
+
ssl?: string | SslOptions;
|
|
433
|
+
} | {
|
|
434
|
+
url: string;
|
|
435
|
+
};
|
|
436
|
+
} | {
|
|
437
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
438
|
+
driver: Verify<Driver, 'd1-http'>;
|
|
439
|
+
dbCredentials: {
|
|
440
|
+
accountId: string;
|
|
441
|
+
databaseId: string;
|
|
442
|
+
token: string;
|
|
443
|
+
};
|
|
444
|
+
} | {
|
|
445
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
446
|
+
driver: Verify<Driver, 'expo'>;
|
|
447
|
+
} | {
|
|
448
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
449
|
+
driver: Verify<Driver, 'durable-sqlite'>;
|
|
450
|
+
} | {} | {
|
|
451
|
+
dialect: Verify<Dialect, 'singlestore'>;
|
|
452
|
+
dbCredentials: {
|
|
453
|
+
host: string;
|
|
454
|
+
port?: number;
|
|
455
|
+
user?: string;
|
|
456
|
+
password?: string;
|
|
457
|
+
database: string;
|
|
458
|
+
ssl?: string | SslOptions;
|
|
459
|
+
} | {
|
|
460
|
+
url: string;
|
|
461
|
+
};
|
|
462
|
+
} | {
|
|
463
|
+
dialect: Verify<Dialect, 'gel'>;
|
|
464
|
+
dbCredentials?: {
|
|
465
|
+
tlsSecurity?: 'insecure' | 'no_host_verification' | 'strict' | 'default';
|
|
466
|
+
} & ({
|
|
467
|
+
url: string;
|
|
468
|
+
} | ({
|
|
469
|
+
host: string;
|
|
470
|
+
port?: number;
|
|
471
|
+
user?: string;
|
|
472
|
+
password?: string;
|
|
473
|
+
database: string;
|
|
474
|
+
}));
|
|
475
|
+
});
|
|
476
|
+
|
|
251
477
|
declare const schema$2: zod.ZodObject<{
|
|
252
478
|
version: zod.ZodLiteral<"5">;
|
|
253
479
|
dialect: zod.ZodLiteral<"mysql">;
|
|
@@ -2868,7 +3094,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
|
|
|
2868
3094
|
statementsToExecute: string[];
|
|
2869
3095
|
apply: () => Promise<void>;
|
|
2870
3096
|
}>;
|
|
2871
|
-
declare const
|
|
3097
|
+
declare const startStudioPostgresServer: (imports: Record<string, unknown>, credentials: PostgresCredentials | {
|
|
2872
3098
|
driver: "pglite";
|
|
2873
3099
|
client: PGlite;
|
|
2874
3100
|
}, options?: {
|
|
@@ -2884,7 +3110,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
|
|
|
2884
3110
|
statementsToExecute: string[];
|
|
2885
3111
|
apply: () => Promise<void>;
|
|
2886
3112
|
}>;
|
|
2887
|
-
declare const
|
|
3113
|
+
declare const startStudioSQLiteServer: (imports: Record<string, unknown>, credentials: SqliteCredentials, options?: {
|
|
2888
3114
|
host?: string;
|
|
2889
3115
|
port?: number;
|
|
2890
3116
|
casing?: CasingType;
|
|
@@ -2897,7 +3123,7 @@ declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstanc
|
|
|
2897
3123
|
statementsToExecute: string[];
|
|
2898
3124
|
apply: () => Promise<void>;
|
|
2899
3125
|
}>;
|
|
2900
|
-
declare const
|
|
3126
|
+
declare const startStudioMySQLServer: (imports: Record<string, unknown>, credentials: MysqlCredentials, options?: {
|
|
2901
3127
|
host?: string;
|
|
2902
3128
|
port?: number;
|
|
2903
3129
|
casing?: CasingType;
|
|
@@ -2910,7 +3136,7 @@ declare const pushSingleStoreSchema: (imports: Record<string, unknown>, drizzleI
|
|
|
2910
3136
|
statementsToExecute: string[];
|
|
2911
3137
|
apply: () => Promise<void>;
|
|
2912
3138
|
}>;
|
|
2913
|
-
declare const
|
|
3139
|
+
declare const startStudioSingleStoreServer: (imports: Record<string, unknown>, credentials: SingleStoreCredentials, options?: {
|
|
2914
3140
|
host?: string;
|
|
2915
3141
|
port?: number;
|
|
2916
3142
|
casing?: CasingType;
|
|
@@ -3107,4 +3333,4 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
|
3107
3333
|
} | undefined;
|
|
3108
3334
|
} | Record<string, unknown>;
|
|
3109
3335
|
|
|
3110
|
-
export { type DrizzleMySQLSnapshotJSON, type DrizzleSQLiteSnapshotJSON, type DrizzleSingleStoreSnapshotJSON, type DrizzleSnapshotJSON, generateDrizzleJson, generateMigration, generateMySQLDrizzleJson, generateMySQLMigration, generateSQLiteDrizzleJson, generateSQLiteMigration, generateSingleStoreDrizzleJson, generateSingleStoreMigration, pushMySQLSchema, pushSQLiteSchema, pushSchema, pushSingleStoreSchema,
|
|
3336
|
+
export { type DrizzleMySQLSnapshotJSON, type DrizzleSQLiteSnapshotJSON, type DrizzleSingleStoreSnapshotJSON, type DrizzleSnapshotJSON, generateDrizzleJson, generateMigration, generateMySQLDrizzleJson, generateMySQLMigration, generateSQLiteDrizzleJson, generateSQLiteMigration, generateSingleStoreDrizzleJson, generateSingleStoreMigration, pushMySQLSchema, pushSQLiteSchema, pushSchema, pushSingleStoreSchema, startStudioMySQLServer, startStudioPostgresServer, startStudioSQLiteServer, startStudioSingleStoreServer, upPgSnapshot };
|
package/api.js
CHANGED
|
@@ -82416,7 +82416,7 @@ var init_session5 = __esm({
|
|
|
82416
82416
|
resourceArn: options.resourceArn,
|
|
82417
82417
|
database: options.database,
|
|
82418
82418
|
transactionId,
|
|
82419
|
-
includeResultMetadata: !fields && !customResultMapper
|
|
82419
|
+
includeResultMetadata: isRqbV2Query || !fields && !customResultMapper
|
|
82420
82420
|
});
|
|
82421
82421
|
}
|
|
82422
82422
|
async execute(placeholderValues = {}) {
|
|
@@ -82477,7 +82477,6 @@ var init_session5 = __esm({
|
|
|
82477
82477
|
}
|
|
82478
82478
|
return row;
|
|
82479
82479
|
});
|
|
82480
|
-
Object.assign(result, { rows: mappedRows });
|
|
82481
82480
|
return customResultMapper(
|
|
82482
82481
|
mappedRows
|
|
82483
82482
|
);
|
|
@@ -168333,10 +168332,10 @@ __export(api_exports, {
|
|
|
168333
168332
|
pushSQLiteSchema: () => pushSQLiteSchema,
|
|
168334
168333
|
pushSchema: () => pushSchema,
|
|
168335
168334
|
pushSingleStoreSchema: () => pushSingleStoreSchema,
|
|
168336
|
-
|
|
168337
|
-
|
|
168338
|
-
|
|
168339
|
-
|
|
168335
|
+
startStudioMySQLServer: () => startStudioMySQLServer,
|
|
168336
|
+
startStudioPostgresServer: () => startStudioPostgresServer,
|
|
168337
|
+
startStudioSQLiteServer: () => startStudioSQLiteServer,
|
|
168338
|
+
startStudioSingleStoreServer: () => startStudioSingleStoreServer,
|
|
168340
168339
|
upPgSnapshot: () => upPgSnapshot
|
|
168341
168340
|
});
|
|
168342
168341
|
module.exports = __toCommonJS(api_exports);
|
|
@@ -168988,7 +168987,7 @@ var pushSchema = async (imports, drizzleInstance, schemaFilters, tablesFilter, e
|
|
|
168988
168987
|
}
|
|
168989
168988
|
};
|
|
168990
168989
|
};
|
|
168991
|
-
var
|
|
168990
|
+
var startStudioPostgresServer = async (imports, credentials2, options) => {
|
|
168992
168991
|
const { drizzleForPostgres: drizzleForPostgres2 } = await Promise.resolve().then(() => (init_studio2(), studio_exports));
|
|
168993
168992
|
const pgSchema3 = {};
|
|
168994
168993
|
const relations = {};
|
|
@@ -169082,7 +169081,7 @@ var pushSQLiteSchema = async (imports, drizzleInstance) => {
|
|
|
169082
169081
|
}
|
|
169083
169082
|
};
|
|
169084
169083
|
};
|
|
169085
|
-
var
|
|
169084
|
+
var startStudioSQLiteServer = async (imports, credentials2, options) => {
|
|
169086
169085
|
const { drizzleForSQLite: drizzleForSQLite2 } = await Promise.resolve().then(() => (init_studio2(), studio_exports));
|
|
169087
169086
|
const sqliteSchema2 = {};
|
|
169088
169087
|
const relations = {};
|
|
@@ -169170,7 +169169,7 @@ var pushMySQLSchema = async (imports, drizzleInstance, databaseName) => {
|
|
|
169170
169169
|
}
|
|
169171
169170
|
};
|
|
169172
169171
|
};
|
|
169173
|
-
var
|
|
169172
|
+
var startStudioMySQLServer = async (imports, credentials2, options) => {
|
|
169174
169173
|
const { drizzleForMySQL: drizzleForMySQL2 } = await Promise.resolve().then(() => (init_studio2(), studio_exports));
|
|
169175
169174
|
const mysqlSchema3 = {};
|
|
169176
169175
|
const relations = {};
|
|
@@ -169264,7 +169263,7 @@ var pushSingleStoreSchema = async (imports, drizzleInstance, databaseName) => {
|
|
|
169264
169263
|
}
|
|
169265
169264
|
};
|
|
169266
169265
|
};
|
|
169267
|
-
var
|
|
169266
|
+
var startStudioSingleStoreServer = async (imports, credentials2, options) => {
|
|
169268
169267
|
const { drizzleForSingleStore: drizzleForSingleStore2 } = await Promise.resolve().then(() => (init_studio2(), studio_exports));
|
|
169269
169268
|
const singleStoreSchema = {};
|
|
169270
169269
|
const relations = {};
|
|
@@ -169324,10 +169323,10 @@ var upPgSnapshot = (snapshot) => {
|
|
|
169324
169323
|
pushSQLiteSchema,
|
|
169325
169324
|
pushSchema,
|
|
169326
169325
|
pushSingleStoreSchema,
|
|
169327
|
-
|
|
169328
|
-
|
|
169329
|
-
|
|
169330
|
-
|
|
169326
|
+
startStudioMySQLServer,
|
|
169327
|
+
startStudioPostgresServer,
|
|
169328
|
+
startStudioSQLiteServer,
|
|
169329
|
+
startStudioSingleStoreServer,
|
|
169331
169330
|
upPgSnapshot
|
|
169332
169331
|
});
|
|
169333
169332
|
/*! Bundled license information:
|