drizzle-kit 0.27.1-19f042a → 0.27.1-4d56096
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 +3 -2
- package/api.d.ts +3 -2
- package/api.js +28 -4
- package/api.mjs +28 -4
- package/bin.cjs +22 -8
- 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 +1 -1
- package/common-DYjgLS6u.d.mts +0 -8
- package/common-DYjgLS6u.d.ts +0 -8
package/api.d.mts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
2
2
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
3
3
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
4
|
-
import { C as CasingType } from './
|
4
|
+
import { C as CasingType, a as Config } from './index-BfiZoTqG.mjs';
|
5
5
|
import * as zod from 'zod';
|
6
6
|
import { TypeOf } from 'zod';
|
7
|
+
import 'tls';
|
7
8
|
|
8
9
|
declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
9
10
|
version: zod.ZodLiteral<"5">;
|
@@ -2273,7 +2274,7 @@ type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
|
2273
2274
|
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
2274
2275
|
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
2275
2276
|
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
2276
|
-
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
|
2277
|
+
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[], tablesFilter?: string[], extensionsFilters?: Config["extensionsFilters"]) => Promise<{
|
2277
2278
|
hasDataLoss: boolean;
|
2278
2279
|
warnings: string[];
|
2279
2280
|
statementsToExecute: string[];
|
package/api.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
2
2
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
3
3
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
4
|
-
import { C as CasingType } from './
|
4
|
+
import { C as CasingType, a as Config } from './index-BfiZoTqG.js';
|
5
5
|
import * as zod from 'zod';
|
6
6
|
import { TypeOf } from 'zod';
|
7
|
+
import 'tls';
|
7
8
|
|
8
9
|
declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
9
10
|
version: zod.ZodLiteral<"5">;
|
@@ -2273,7 +2274,7 @@ type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
|
2273
2274
|
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
2274
2275
|
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
2275
2276
|
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
2276
|
-
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
|
2277
|
+
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[], tablesFilter?: string[], extensionsFilters?: Config["extensionsFilters"]) => Promise<{
|
2277
2278
|
hasDataLoss: boolean;
|
2278
2279
|
warnings: string[];
|
2279
2280
|
statementsToExecute: string[];
|
package/api.js
CHANGED
@@ -30212,7 +30212,7 @@ var init_blob = __esm({
|
|
30212
30212
|
return "blob";
|
30213
30213
|
}
|
30214
30214
|
mapFromDriverValue(value) {
|
30215
|
-
return BigInt(value.toString());
|
30215
|
+
return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
|
30216
30216
|
}
|
30217
30217
|
mapToDriverValue(value) {
|
30218
30218
|
return Buffer.from(value.toString());
|
@@ -30237,7 +30237,7 @@ var init_blob = __esm({
|
|
30237
30237
|
return "blob";
|
30238
30238
|
}
|
30239
30239
|
mapFromDriverValue(value) {
|
30240
|
-
return JSON.parse(value.toString());
|
30240
|
+
return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
|
30241
30241
|
}
|
30242
30242
|
mapToDriverValue(value) {
|
30243
30243
|
return Buffer.from(JSON.stringify(value));
|
@@ -34057,6 +34057,25 @@ WHERE
|
|
34057
34057
|
}
|
34058
34058
|
});
|
34059
34059
|
|
34060
|
+
// src/extensions/getTablesFilterByExtensions.ts
|
34061
|
+
var getTablesFilterByExtensions;
|
34062
|
+
var init_getTablesFilterByExtensions = __esm({
|
34063
|
+
"src/extensions/getTablesFilterByExtensions.ts"() {
|
34064
|
+
"use strict";
|
34065
|
+
getTablesFilterByExtensions = ({
|
34066
|
+
extensionsFilters,
|
34067
|
+
dialect: dialect4
|
34068
|
+
}) => {
|
34069
|
+
if (extensionsFilters) {
|
34070
|
+
if (extensionsFilters.includes("postgis") && dialect4 === "postgresql") {
|
34071
|
+
return ["!geography_columns", "!geometry_columns", "!spatial_ref_sys"];
|
34072
|
+
}
|
34073
|
+
}
|
34074
|
+
return [];
|
34075
|
+
};
|
34076
|
+
}
|
34077
|
+
});
|
34078
|
+
|
34060
34079
|
// ../drizzle-orm/dist/mysql-core/alias.js
|
34061
34080
|
var init_alias4 = __esm({
|
34062
34081
|
"../drizzle-orm/dist/mysql-core/alias.js"() {
|
@@ -39374,6 +39393,7 @@ var init_utils9 = __esm({
|
|
39374
39393
|
"use strict";
|
39375
39394
|
import_hanji7 = __toESM(require_hanji());
|
39376
39395
|
init_lib();
|
39396
|
+
init_getTablesFilterByExtensions();
|
39377
39397
|
init_global();
|
39378
39398
|
init_schemaValidator();
|
39379
39399
|
init_serializer();
|
@@ -40330,6 +40350,7 @@ var sqlitePushIntrospect = async (db, filters) => {
|
|
40330
40350
|
|
40331
40351
|
// src/api.ts
|
40332
40352
|
init_sqlitePushUtils();
|
40353
|
+
init_getTablesFilterByExtensions();
|
40333
40354
|
init_global();
|
40334
40355
|
init_migrationPreparator();
|
40335
40356
|
init_mysqlSchema();
|
@@ -40383,9 +40404,12 @@ var generateMigration = async (prev, cur) => {
|
|
40383
40404
|
);
|
40384
40405
|
return sqlStatements;
|
40385
40406
|
};
|
40386
|
-
var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
40407
|
+
var pushSchema = async (imports, drizzleInstance, schemaFilters, tablesFilter, extensionsFilters) => {
|
40387
40408
|
const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
40388
40409
|
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
40410
|
+
const filters = (tablesFilter ?? []).concat(
|
40411
|
+
getTablesFilterByExtensions({ extensionsFilters, dialect: "postgresql" })
|
40412
|
+
);
|
40389
40413
|
const db = {
|
40390
40414
|
query: async (query, params) => {
|
40391
40415
|
const res = await drizzleInstance.execute(sql2.raw(query));
|
@@ -40395,7 +40419,7 @@ var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
|
40395
40419
|
const cur = generateDrizzleJson(imports);
|
40396
40420
|
const { schema: prev } = await pgPushIntrospect(
|
40397
40421
|
db,
|
40398
|
-
|
40422
|
+
filters,
|
40399
40423
|
schemaFilters ?? ["public"],
|
40400
40424
|
void 0
|
40401
40425
|
);
|
package/api.mjs
CHANGED
@@ -30217,7 +30217,7 @@ var init_blob = __esm({
|
|
30217
30217
|
return "blob";
|
30218
30218
|
}
|
30219
30219
|
mapFromDriverValue(value) {
|
30220
|
-
return BigInt(value.toString());
|
30220
|
+
return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
|
30221
30221
|
}
|
30222
30222
|
mapToDriverValue(value) {
|
30223
30223
|
return Buffer.from(value.toString());
|
@@ -30242,7 +30242,7 @@ var init_blob = __esm({
|
|
30242
30242
|
return "blob";
|
30243
30243
|
}
|
30244
30244
|
mapFromDriverValue(value) {
|
30245
|
-
return JSON.parse(value.toString());
|
30245
|
+
return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
|
30246
30246
|
}
|
30247
30247
|
mapToDriverValue(value) {
|
30248
30248
|
return Buffer.from(JSON.stringify(value));
|
@@ -34062,6 +34062,25 @@ WHERE
|
|
34062
34062
|
}
|
34063
34063
|
});
|
34064
34064
|
|
34065
|
+
// src/extensions/getTablesFilterByExtensions.ts
|
34066
|
+
var getTablesFilterByExtensions;
|
34067
|
+
var init_getTablesFilterByExtensions = __esm({
|
34068
|
+
"src/extensions/getTablesFilterByExtensions.ts"() {
|
34069
|
+
"use strict";
|
34070
|
+
getTablesFilterByExtensions = ({
|
34071
|
+
extensionsFilters,
|
34072
|
+
dialect: dialect4
|
34073
|
+
}) => {
|
34074
|
+
if (extensionsFilters) {
|
34075
|
+
if (extensionsFilters.includes("postgis") && dialect4 === "postgresql") {
|
34076
|
+
return ["!geography_columns", "!geometry_columns", "!spatial_ref_sys"];
|
34077
|
+
}
|
34078
|
+
}
|
34079
|
+
return [];
|
34080
|
+
};
|
34081
|
+
}
|
34082
|
+
});
|
34083
|
+
|
34065
34084
|
// ../drizzle-orm/dist/mysql-core/alias.js
|
34066
34085
|
var init_alias4 = __esm({
|
34067
34086
|
"../drizzle-orm/dist/mysql-core/alias.js"() {
|
@@ -39379,6 +39398,7 @@ var init_utils9 = __esm({
|
|
39379
39398
|
"use strict";
|
39380
39399
|
import_hanji7 = __toESM(require_hanji());
|
39381
39400
|
init_lib();
|
39401
|
+
init_getTablesFilterByExtensions();
|
39382
39402
|
init_global();
|
39383
39403
|
init_schemaValidator();
|
39384
39404
|
init_serializer();
|
@@ -40321,6 +40341,7 @@ var sqlitePushIntrospect = async (db, filters) => {
|
|
40321
40341
|
|
40322
40342
|
// src/api.ts
|
40323
40343
|
init_sqlitePushUtils();
|
40344
|
+
init_getTablesFilterByExtensions();
|
40324
40345
|
init_global();
|
40325
40346
|
init_migrationPreparator();
|
40326
40347
|
init_mysqlSchema();
|
@@ -40374,9 +40395,12 @@ var generateMigration = async (prev, cur) => {
|
|
40374
40395
|
);
|
40375
40396
|
return sqlStatements;
|
40376
40397
|
};
|
40377
|
-
var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
40398
|
+
var pushSchema = async (imports, drizzleInstance, schemaFilters, tablesFilter, extensionsFilters) => {
|
40378
40399
|
const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
40379
40400
|
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
40401
|
+
const filters = (tablesFilter ?? []).concat(
|
40402
|
+
getTablesFilterByExtensions({ extensionsFilters, dialect: "postgresql" })
|
40403
|
+
);
|
40380
40404
|
const db = {
|
40381
40405
|
query: async (query, params) => {
|
40382
40406
|
const res = await drizzleInstance.execute(sql2.raw(query));
|
@@ -40386,7 +40410,7 @@ var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
|
40386
40410
|
const cur = generateDrizzleJson(imports);
|
40387
40411
|
const { schema: prev } = await pgPushIntrospect(
|
40388
40412
|
db,
|
40389
|
-
|
40413
|
+
filters,
|
40390
40414
|
schemaFilters ?? ["public"],
|
40391
40415
|
void 0
|
40392
40416
|
);
|
package/bin.cjs
CHANGED
@@ -11447,6 +11447,25 @@ var require_glob = __commonJS({
|
|
11447
11447
|
}
|
11448
11448
|
});
|
11449
11449
|
|
11450
|
+
// src/extensions/getTablesFilterByExtensions.ts
|
11451
|
+
var getTablesFilterByExtensions;
|
11452
|
+
var init_getTablesFilterByExtensions = __esm({
|
11453
|
+
"src/extensions/getTablesFilterByExtensions.ts"() {
|
11454
|
+
"use strict";
|
11455
|
+
getTablesFilterByExtensions = ({
|
11456
|
+
extensionsFilters,
|
11457
|
+
dialect: dialect4
|
11458
|
+
}) => {
|
11459
|
+
if (extensionsFilters) {
|
11460
|
+
if (extensionsFilters.includes("postgis") && dialect4 === "postgresql") {
|
11461
|
+
return ["!geography_columns", "!geometry_columns", "!spatial_ref_sys"];
|
11462
|
+
}
|
11463
|
+
}
|
11464
|
+
return [];
|
11465
|
+
};
|
11466
|
+
}
|
11467
|
+
});
|
11468
|
+
|
11450
11469
|
// src/schemaValidator.ts
|
11451
11470
|
var dialects, dialect3, commonSquashedSchema, commonSchema;
|
11452
11471
|
var init_schemaValidator = __esm({
|
@@ -17651,6 +17670,7 @@ var init_utils4 = __esm({
|
|
17651
17670
|
import_hanji2 = __toESM(require_hanji());
|
17652
17671
|
import_path2 = require("path");
|
17653
17672
|
init_lib();
|
17673
|
+
init_getTablesFilterByExtensions();
|
17654
17674
|
init_global();
|
17655
17675
|
init_schemaValidator();
|
17656
17676
|
init_serializer();
|
@@ -17792,13 +17812,7 @@ var init_utils4 = __esm({
|
|
17792
17812
|
const tablesFilter = tablesFilterConfig ? typeof tablesFilterConfig === "string" ? [tablesFilterConfig] : tablesFilterConfig : [];
|
17793
17813
|
const schemasFilterConfig = config.schemaFilter;
|
17794
17814
|
const schemasFilter = schemasFilterConfig ? typeof schemasFilterConfig === "string" ? [schemasFilterConfig] : schemasFilterConfig : [];
|
17795
|
-
|
17796
|
-
if (config.extensionsFilters.includes("postgis") && config.dialect === "postgresql") {
|
17797
|
-
tablesFilter.push(
|
17798
|
-
...["!geography_columns", "!geometry_columns", "!spatial_ref_sys"]
|
17799
|
-
);
|
17800
|
-
}
|
17801
|
-
}
|
17815
|
+
tablesFilter.push(...getTablesFilterByExtensions(config));
|
17802
17816
|
if (config.dialect === "postgresql") {
|
17803
17817
|
const parsed2 = postgresCredentials.safeParse(config);
|
17804
17818
|
if (!parsed2.success) {
|
@@ -88993,7 +89007,7 @@ init_utils2();
|
|
88993
89007
|
var version2 = async () => {
|
88994
89008
|
const { npmVersion } = await ormCoreVersions();
|
88995
89009
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
88996
|
-
const envVersion = "0.27.1-
|
89010
|
+
const envVersion = "0.27.1-4d56096";
|
88997
89011
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
88998
89012
|
const versions = `drizzle-kit: ${kitVersion}
|
88999
89013
|
${ormVersion}`;
|
@@ -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 };
|