drizzle-kit 0.31.5 → 0.31.6-5a7c534

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/bin.cjs CHANGED
@@ -18433,12 +18433,13 @@ __export(pgImports_exports, {
18433
18433
  prepareFromExports: () => prepareFromExports2,
18434
18434
  prepareFromPgImports: () => prepareFromPgImports
18435
18435
  });
18436
- var import_drizzle_orm3, import_pg_core, prepareFromExports2, prepareFromPgImports;
18436
+ var import_drizzle_orm3, import_pg_core, import_relations, prepareFromExports2, prepareFromPgImports;
18437
18437
  var init_pgImports = __esm({
18438
18438
  "src/serializer/pgImports.ts"() {
18439
18439
  "use strict";
18440
18440
  import_drizzle_orm3 = require("drizzle-orm");
18441
18441
  import_pg_core = require("drizzle-orm/pg-core");
18442
+ import_relations = require("drizzle-orm/relations");
18442
18443
  init_utils3();
18443
18444
  prepareFromExports2 = (exports2) => {
18444
18445
  const tables = [];
@@ -18449,6 +18450,7 @@ var init_pgImports = __esm({
18449
18450
  const policies = [];
18450
18451
  const views = [];
18451
18452
  const matViews = [];
18453
+ const relations5 = [];
18452
18454
  const i0values = Object.values(exports2);
18453
18455
  i0values.forEach((t4) => {
18454
18456
  if ((0, import_pg_core.isPgEnum)(t4)) {
@@ -18476,8 +18478,11 @@ var init_pgImports = __esm({
18476
18478
  if ((0, import_drizzle_orm3.is)(t4, import_pg_core.PgPolicy)) {
18477
18479
  policies.push(t4);
18478
18480
  }
18481
+ if ((0, import_drizzle_orm3.is)(t4, import_relations.Relations)) {
18482
+ relations5.push(t4);
18483
+ }
18479
18484
  });
18480
- return { tables, enums, schemas, sequences, views, matViews, roles, policies };
18485
+ return { tables, enums, schemas, sequences, views, matViews, roles, policies, relations: relations5 };
18481
18486
  };
18482
18487
  prepareFromPgImports = async (imports) => {
18483
18488
  const tables = [];
@@ -18488,6 +18493,7 @@ var init_pgImports = __esm({
18488
18493
  const roles = [];
18489
18494
  const policies = [];
18490
18495
  const matViews = [];
18496
+ const relations5 = [];
18491
18497
  const { unregister } = await safeRegister();
18492
18498
  for (let i4 = 0; i4 < imports.length; i4++) {
18493
18499
  const it = imports[i4];
@@ -18501,9 +18507,20 @@ var init_pgImports = __esm({
18501
18507
  matViews.push(...prepared.matViews);
18502
18508
  roles.push(...prepared.roles);
18503
18509
  policies.push(...prepared.policies);
18510
+ relations5.push(...prepared.relations);
18504
18511
  }
18505
18512
  unregister();
18506
- return { tables: Array.from(new Set(tables)), enums, schemas, sequences, views, matViews, roles, policies };
18513
+ return {
18514
+ tables: Array.from(new Set(tables)),
18515
+ enums,
18516
+ schemas,
18517
+ sequences,
18518
+ views,
18519
+ matViews,
18520
+ roles,
18521
+ policies,
18522
+ relations: relations5
18523
+ };
18507
18524
  };
18508
18525
  }
18509
18526
  });
@@ -21446,7 +21463,7 @@ ${filenames.join("\n")}
21446
21463
  });
21447
21464
 
21448
21465
  // src/migrationPreparator.ts
21449
- var import_crypto, import_fs5, prepareMySqlDbPushSnapshot, prepareSingleStoreDbPushSnapshot, prepareSQLiteDbPushSnapshot, prepareMySqlMigrationSnapshot, prepareSingleStoreMigrationSnapshot, prepareSqliteMigrationSnapshot, fillPgSnapshot, preparePgMigrationSnapshot, preparePrevSnapshot;
21466
+ var import_crypto, import_fs5, prepareMySqlDbPushSnapshot, prepareSingleStoreDbPushSnapshot, prepareSQLiteDbPushSnapshot, prepareMySqlMigrationSnapshot, prepareSingleStoreMigrationSnapshot, prepareSqliteMigrationSnapshot, preparePgMigrationSnapshot, preparePrevSnapshot;
21450
21467
  var init_migrationPreparator = __esm({
21451
21468
  "src/migrationPreparator.ts"() {
21452
21469
  "use strict";
@@ -21544,13 +21561,6 @@ var init_migrationPreparator = __esm({
21544
21561
  };
21545
21562
  return { prev: prevSnapshot, cur: result, custom: custom2 };
21546
21563
  };
21547
- fillPgSnapshot = ({
21548
- serialized,
21549
- id,
21550
- idPrev
21551
- }) => {
21552
- return { id, prevId: idPrev, ...serialized };
21553
- };
21554
21564
  preparePgMigrationSnapshot = async (snapshots, schemaPath, casing2) => {
21555
21565
  const prevSnapshot = pgSchema.parse(preparePrevSnapshot(snapshots, dryPg));
21556
21566
  const serialized = await serializePg(schemaPath, casing2);
@@ -21558,7 +21568,11 @@ var init_migrationPreparator = __esm({
21558
21568
  const idPrev = prevSnapshot.id;
21559
21569
  const result = { id, prevId: idPrev, ...serialized };
21560
21570
  const { id: _ignoredId, prevId: _ignoredPrevId, ...prevRest } = prevSnapshot;
21561
- const custom2 = fillPgSnapshot({ serialized: prevRest, id, idPrev });
21571
+ const custom2 = {
21572
+ id,
21573
+ prevId: idPrev,
21574
+ ...prevRest
21575
+ };
21562
21576
  return { prev: prevSnapshot, cur: result, custom: custom2 };
21563
21577
  };
21564
21578
  preparePrevSnapshot = (snapshots, defaultPrev) => {
@@ -80528,7 +80542,7 @@ var init_connections = __esm({
80528
80542
  const { PGlite, types: types3 } = await import("@electric-sql/pglite");
80529
80543
  const { drizzle } = await import("drizzle-orm/pglite");
80530
80544
  const { migrate: migrate2 } = await import("drizzle-orm/pglite/migrator");
80531
- const pglite = new PGlite(normalisePGliteUrl(credentials2.url));
80545
+ const pglite = "client" in credentials2 ? credentials2.client : new PGlite(normalisePGliteUrl(credentials2.url));
80532
80546
  await pglite.waitReady;
80533
80547
  const drzl = drizzle(pglite);
80534
80548
  const migrateFn = async (config) => {
@@ -86756,12 +86770,12 @@ function generateIdentityParams2(identity) {
86756
86770
  }
86757
86771
  return `.generatedByDefaultAsIdentity(${paramsObj})`;
86758
86772
  }
86759
- var import_drizzle_orm10, import_relations, import_casing5, pgImportsList, timeConfig2, possibleIntervals, intervalStrToObj, intervalConfig, mapColumnDefault4, importsPatch2, relations4, escapeColumnKey4, withCasing3, dbColumnName4, paramNameFor2, schemaToTypeScript4, isCyclic4, isSelf4, buildArrayDefault2, mapDefault2, column9, dimensionsInArray2, createTableColumns4, createTableIndexes4, createTablePKs4, createTablePolicies2, createTableUniques4, createTableChecks4, createTableFKs4;
86773
+ var import_drizzle_orm10, import_relations2, import_casing5, pgImportsList, timeConfig2, possibleIntervals, intervalStrToObj, intervalConfig, mapColumnDefault4, importsPatch2, relations4, escapeColumnKey4, withCasing3, dbColumnName4, paramNameFor2, schemaToTypeScript4, isCyclic4, isSelf4, buildArrayDefault2, mapDefault2, column9, dimensionsInArray2, createTableColumns4, createTableIndexes4, createTablePKs4, createTablePolicies2, createTableUniques4, createTableChecks4, createTableFKs4;
86760
86774
  var init_introspect_pg = __esm({
86761
86775
  "src/introspect-pg.ts"() {
86762
86776
  "use strict";
86763
86777
  import_drizzle_orm10 = require("drizzle-orm");
86764
- import_relations = require("drizzle-orm/relations");
86778
+ import_relations2 = require("drizzle-orm/relations");
86765
86779
  init_utils();
86766
86780
  import_casing5 = require("drizzle-orm/casing");
86767
86781
  init_global();
@@ -91254,7 +91268,7 @@ __export(studio_exports, {
91254
91268
  prepareServer: () => prepareServer,
91255
91269
  prepareSingleStoreSchema: () => prepareSingleStoreSchema
91256
91270
  });
91257
- var import_crypto9, import_drizzle_orm11, import_mysql_core3, import_pg_core3, import_singlestore_core3, import_sqlite_core3, import_fs12, import_node_https2, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareSingleStoreSchema, getCustomDefaults, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleForLibSQL, drizzleForSingleStore, extractRelations, init, proxySchema, transactionProxySchema, defaultsSchema, schema5, jsonStringify, prepareServer;
91271
+ var import_crypto9, import_drizzle_orm11, import_mysql_core3, import_pg_core3, import_relations3, import_singlestore_core3, import_sqlite_core3, import_fs12, import_node_https2, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareSingleStoreSchema, getCustomDefaults, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleForLibSQL, drizzleForSingleStore, extractRelations, init, proxySchema, transactionProxySchema, defaultsSchema, schema5, jsonStringify, prepareServer;
91258
91272
  var init_studio2 = __esm({
91259
91273
  "src/serializer/studio.ts"() {
91260
91274
  "use strict";
@@ -91264,6 +91278,7 @@ var init_studio2 = __esm({
91264
91278
  import_drizzle_orm11 = require("drizzle-orm");
91265
91279
  import_mysql_core3 = require("drizzle-orm/mysql-core");
91266
91280
  import_pg_core3 = require("drizzle-orm/pg-core");
91281
+ import_relations3 = require("drizzle-orm/relations");
91267
91282
  import_singlestore_core3 = require("drizzle-orm/singlestore-core");
91268
91283
  import_sqlite_core3 = require("drizzle-orm/sqlite-core");
91269
91284
  import_fs12 = __toESM(require("fs"));
@@ -91296,7 +91311,7 @@ var init_studio2 = __esm({
91296
91311
  pgSchema2[schema6] = pgSchema2[schema6] || {};
91297
91312
  pgSchema2[schema6][k3] = t4;
91298
91313
  }
91299
- if ((0, import_drizzle_orm11.is)(t4, import_drizzle_orm11.Relations)) {
91314
+ if ((0, import_drizzle_orm11.is)(t4, import_relations3.Relations)) {
91300
91315
  relations5[k3] = t4;
91301
91316
  }
91302
91317
  });
@@ -91325,7 +91340,7 @@ var init_studio2 = __esm({
91325
91340
  const schema6 = (0, import_mysql_core3.getTableConfig)(t4).schema || "public";
91326
91341
  mysqlSchema3[schema6][k3] = t4;
91327
91342
  }
91328
- if ((0, import_drizzle_orm11.is)(t4, import_drizzle_orm11.Relations)) {
91343
+ if ((0, import_drizzle_orm11.is)(t4, import_relations3.Relations)) {
91329
91344
  relations5[k3] = t4;
91330
91345
  }
91331
91346
  });
@@ -91354,7 +91369,7 @@ var init_studio2 = __esm({
91354
91369
  const schema6 = "public";
91355
91370
  sqliteSchema2[schema6][k3] = t4;
91356
91371
  }
91357
- if ((0, import_drizzle_orm11.is)(t4, import_drizzle_orm11.Relations)) {
91372
+ if ((0, import_drizzle_orm11.is)(t4, import_relations3.Relations)) {
91358
91373
  relations5[k3] = t4;
91359
91374
  }
91360
91375
  });
@@ -91383,7 +91398,7 @@ var init_studio2 = __esm({
91383
91398
  const schema6 = (0, import_singlestore_core3.getTableConfig)(t4).schema || "public";
91384
91399
  singlestoreSchema2[schema6][k3] = t4;
91385
91400
  }
91386
- if ((0, import_drizzle_orm11.is)(t4, import_drizzle_orm11.Relations)) {
91401
+ if ((0, import_drizzle_orm11.is)(t4, import_relations3.Relations)) {
91387
91402
  relations5[k3] = t4;
91388
91403
  }
91389
91404
  });
@@ -91429,7 +91444,7 @@ var init_studio2 = __esm({
91429
91444
  if (driver2 === "aws-data-api") {
91430
91445
  dbUrl = `aws-data-api://${credentials2.database}/${credentials2.secretArn}/${credentials2.resourceArn}`;
91431
91446
  } else if (driver2 === "pglite") {
91432
- dbUrl = credentials2.url;
91447
+ dbUrl = "client" in credentials2 ? credentials2.client.dataDir || "pglite://custom-client" : credentials2.url;
91433
91448
  } else {
91434
91449
  assertUnreachable(driver2);
91435
91450
  }
@@ -91557,7 +91572,7 @@ var init_studio2 = __esm({
91557
91572
  const relations5 = Object.values(tablesConfig.tables).map(
91558
91573
  (it) => Object.entries(it.relations).map(([name, relation]) => {
91559
91574
  try {
91560
- const normalized = (0, import_drizzle_orm11.normalizeRelation)(
91575
+ const normalized = (0, import_relations3.normalizeRelation)(
91561
91576
  tablesConfig.tables,
91562
91577
  tablesConfig.tableNamesMap,
91563
91578
  relation
@@ -91580,9 +91595,9 @@ var init_studio2 = __esm({
91580
91595
  throw new Error("unsupported dialect");
91581
91596
  }
91582
91597
  let type;
91583
- if ((0, import_drizzle_orm11.is)(rel, import_drizzle_orm11.One)) {
91598
+ if ((0, import_drizzle_orm11.is)(rel, import_relations3.One)) {
91584
91599
  type = "one";
91585
- } else if ((0, import_drizzle_orm11.is)(rel, import_drizzle_orm11.Many)) {
91600
+ } else if ((0, import_drizzle_orm11.is)(rel, import_relations3.Many)) {
91586
91601
  type = "many";
91587
91602
  } else {
91588
91603
  throw new Error("unsupported relation type");
@@ -91711,9 +91726,9 @@ var init_studio2 = __esm({
91711
91726
  ),
91712
91727
  ...relations5
91713
91728
  };
91714
- const relationsConfig = (0, import_drizzle_orm11.extractTablesRelationalConfig)(
91729
+ const relationsConfig = (0, import_relations3.extractTablesRelationalConfig)(
91715
91730
  relationalSchema,
91716
- import_drizzle_orm11.createTableRelationsHelpers
91731
+ import_relations3.createTableRelationsHelpers
91717
91732
  );
91718
91733
  app.post("/", zValidator("json", schema5), async (c3) => {
91719
91734
  const body = c3.req.valid("json");
@@ -94317,7 +94332,7 @@ init_utils5();
94317
94332
  var version2 = async () => {
94318
94333
  const { npmVersion } = await ormCoreVersions();
94319
94334
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
94320
- const envVersion = "0.31.5";
94335
+ const envVersion = "0.31.6-5a7c534";
94321
94336
  const kitVersion = envVersion ? `v${envVersion}` : "--";
94322
94337
  const versions = `drizzle-kit: ${kitVersion}
94323
94338
  ${ormVersion}`;
package/index.d.mts CHANGED
@@ -1,2 +1,319 @@
1
- import 'tls';
2
- export { a as Config, d as defineConfig } from './index-BAUrj6Ib.mjs';
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 drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
6
+ type Driver = (typeof drivers)[number];
7
+
8
+ declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso", "singlestore", "gel"];
9
+ type Dialect = (typeof dialects)[number];
10
+
11
+ type SslOptions = {
12
+ pfx?: string;
13
+ key?: string;
14
+ passphrase?: string;
15
+ cert?: string;
16
+ ca?: string | string[];
17
+ crl?: string | string[];
18
+ ciphers?: string;
19
+ rejectUnauthorized?: boolean;
20
+ };
21
+ type Verify<T, U extends T> = U;
22
+ /**
23
+ * **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
24
+ * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
25
+ *
26
+ * **Config** usage:
27
+ *
28
+ * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
29
+ * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore
30
+ *
31
+ * See https://orm.drizzle.team/kit-docs/config-reference#dialect
32
+ *
33
+ * ---
34
+ * `schema` - param lets you define where your schema file/files live.
35
+ * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
36
+ *
37
+ * See https://orm.drizzle.team/kit-docs/config-reference#schema
38
+ *
39
+ * ---
40
+ * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
41
+ *
42
+ * See https://orm.drizzle.team/kit-docs/config-reference#out
43
+ *
44
+ * ---
45
+ * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
46
+ * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
47
+ * 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
48
+ *
49
+ * See https://orm.drizzle.team/kit-docs/config-reference#driver
50
+ *
51
+ * ---
52
+ *
53
+ * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
54
+ *
55
+ * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
56
+ *
57
+ * ---
58
+ *
59
+ * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
60
+ * By default, all information about executed migrations will be stored in the database inside
61
+ * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
62
+ * However, you can configure where to store those records.
63
+ *
64
+ * See https://orm.drizzle.team/kit-docs/config-reference#migrations
65
+ *
66
+ * ---
67
+ *
68
+ * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
69
+ * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
70
+ * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
71
+ * Drizzle ORM has to apply them sequentially one by one.
72
+ *
73
+ * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
74
+ *
75
+ * ---
76
+ *
77
+ * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
78
+ * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
79
+ *
80
+ * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
81
+ *
82
+ * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
83
+ *
84
+ * ---
85
+ *
86
+ * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
87
+ * This parameter accepts a single schema as a string or an array of schemas as strings.
88
+ * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
89
+ * but you can add any schema you need.
90
+ *
91
+ * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
92
+ * drizzle schema that are a part of the my_schema schema.
93
+ *
94
+ * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
95
+ *
96
+ * ---
97
+ *
98
+ * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
99
+ *
100
+ * > Note: This command will only print the statements that should be executed.
101
+ * To approve them before applying, please refer to the `strict` command.
102
+ *
103
+ * See https://orm.drizzle.team/kit-docs/config-reference#verbose
104
+ *
105
+ * ---
106
+ *
107
+ * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
108
+ * either to execute all statements needed to sync your schema with the database or not.
109
+ *
110
+ * See https://orm.drizzle.team/kit-docs/config-reference#strict
111
+ */
112
+ type Config = {
113
+ dialect: Dialect;
114
+ out?: string;
115
+ breakpoints?: boolean;
116
+ tablesFilter?: string | string[];
117
+ extensionsFilters?: 'postgis'[];
118
+ schemaFilter?: string | string[];
119
+ schema?: string | string[];
120
+ verbose?: boolean;
121
+ strict?: boolean;
122
+ casing?: 'camelCase' | 'snake_case';
123
+ migrations?: {
124
+ table?: string;
125
+ schema?: string;
126
+ prefix?: Prefix;
127
+ };
128
+ introspect?: {
129
+ casing: 'camel' | 'preserve';
130
+ };
131
+ entities?: {
132
+ roles?: boolean | {
133
+ provider?: 'supabase' | 'neon' | string & {};
134
+ exclude?: string[];
135
+ include?: string[];
136
+ };
137
+ };
138
+ } & ({
139
+ dialect: Verify<Dialect, 'turso'>;
140
+ dbCredentials: {
141
+ url: string;
142
+ authToken?: string;
143
+ };
144
+ } | {
145
+ dialect: Verify<Dialect, 'sqlite'>;
146
+ dbCredentials: {
147
+ url: string;
148
+ };
149
+ } | {
150
+ dialect: Verify<Dialect, 'postgresql'>;
151
+ dbCredentials: ({
152
+ host: string;
153
+ port?: number;
154
+ user?: string;
155
+ password?: string;
156
+ database: string;
157
+ ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
158
+ } & {}) | {
159
+ url: string;
160
+ };
161
+ } | {
162
+ dialect: Verify<Dialect, 'postgresql'>;
163
+ driver: Verify<Driver, 'aws-data-api'>;
164
+ dbCredentials: {
165
+ database: string;
166
+ secretArn: string;
167
+ resourceArn: string;
168
+ };
169
+ } | {
170
+ dialect: Verify<Dialect, 'postgresql'>;
171
+ driver: Verify<Driver, 'pglite'>;
172
+ dbCredentials: {
173
+ url: string;
174
+ };
175
+ } | {
176
+ dialect: Verify<Dialect, 'mysql'>;
177
+ dbCredentials: {
178
+ host: string;
179
+ port?: number;
180
+ user?: string;
181
+ password?: string;
182
+ database: string;
183
+ ssl?: string | SslOptions;
184
+ } | {
185
+ url: string;
186
+ };
187
+ } | {
188
+ dialect: Verify<Dialect, 'sqlite'>;
189
+ driver: Verify<Driver, 'd1-http'>;
190
+ dbCredentials: {
191
+ accountId: string;
192
+ databaseId: string;
193
+ token: string;
194
+ };
195
+ } | {
196
+ dialect: Verify<Dialect, 'sqlite'>;
197
+ driver: Verify<Driver, 'expo'>;
198
+ } | {
199
+ dialect: Verify<Dialect, 'sqlite'>;
200
+ driver: Verify<Driver, 'durable-sqlite'>;
201
+ } | {} | {
202
+ dialect: Verify<Dialect, 'singlestore'>;
203
+ dbCredentials: {
204
+ host: string;
205
+ port?: number;
206
+ user?: string;
207
+ password?: string;
208
+ database: string;
209
+ ssl?: string | SslOptions;
210
+ } | {
211
+ url: string;
212
+ };
213
+ } | {
214
+ dialect: Verify<Dialect, 'gel'>;
215
+ dbCredentials?: {
216
+ tlsSecurity?: 'insecure' | 'no_host_verification' | 'strict' | 'default';
217
+ } & ({
218
+ url: string;
219
+ } | ({
220
+ host: string;
221
+ port?: number;
222
+ user?: string;
223
+ password?: string;
224
+ database: string;
225
+ }));
226
+ });
227
+ /**
228
+ * **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
229
+ * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
230
+ *
231
+ * **Config** usage:
232
+ *
233
+ * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
234
+ * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore`, `gel`
235
+ *
236
+ * See https://orm.drizzle.team/kit-docs/config-reference#dialect
237
+ *
238
+ * ---
239
+ * `schema` - param lets you define where your schema file/files live.
240
+ * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
241
+ *
242
+ * See https://orm.drizzle.team/kit-docs/config-reference#schema
243
+ *
244
+ * ---
245
+ * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
246
+ *
247
+ * See https://orm.drizzle.team/kit-docs/config-reference#out
248
+ *
249
+ * ---
250
+ * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
251
+ * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
252
+ * 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
253
+ *
254
+ * See https://orm.drizzle.team/kit-docs/config-reference#driver
255
+ *
256
+ * ---
257
+ *
258
+ * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
259
+ *
260
+ * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
261
+ *
262
+ * ---
263
+ *
264
+ * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
265
+ * By default, all information about executed migrations will be stored in the database inside
266
+ * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
267
+ * However, you can configure where to store those records.
268
+ *
269
+ * See https://orm.drizzle.team/kit-docs/config-reference#migrations
270
+ *
271
+ * ---
272
+ *
273
+ * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
274
+ * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
275
+ * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
276
+ * Drizzle ORM has to apply them sequentially one by one.
277
+ *
278
+ * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
279
+ *
280
+ * ---
281
+ *
282
+ * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
283
+ * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
284
+ *
285
+ * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
286
+ *
287
+ * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
288
+ *
289
+ * ---
290
+ *
291
+ * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
292
+ * This parameter accepts a single schema as a string or an array of schemas as strings.
293
+ * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
294
+ * but you can add any schema you need.
295
+ *
296
+ * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
297
+ * drizzle schema that are a part of the my_schema schema.
298
+ *
299
+ * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
300
+ *
301
+ * ---
302
+ *
303
+ * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
304
+ *
305
+ * > Note: This command will only print the statements that should be executed.
306
+ * To approve them before applying, please refer to the `strict` command.
307
+ *
308
+ * See https://orm.drizzle.team/kit-docs/config-reference#verbose
309
+ *
310
+ * ---
311
+ *
312
+ * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
313
+ * either to execute all statements needed to sync your schema with the database or not.
314
+ *
315
+ * See https://orm.drizzle.team/kit-docs/config-reference#strict
316
+ */
317
+ declare function defineConfig(config: Config): Config;
318
+
319
+ export { type Config, defineConfig };