drizzle-kit 0.20.4-dea9219 → 0.20.5-1f065b5

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.
@@ -1,4 +1,9 @@
1
1
  import { AnyMySqlTable, MySqlSchema } from "drizzle-orm/mysql-core";
2
+ export declare const prepareFromExports: (exports: Record<string, unknown>) => {
3
+ tables: AnyMySqlTable<{}>[];
4
+ enums: any[];
5
+ schemas: MySqlSchema<string>[];
6
+ };
2
7
  export declare const prepareFromMySqlImports: (imports: string[]) => Promise<{
3
8
  tables: AnyMySqlTable<{}>[];
4
9
  enums: any[];
@@ -1,7 +1,7 @@
1
1
  import { AnyMySqlTable, MySqlSchema } from "drizzle-orm/mysql-core";
2
2
  import { MySqlSchemaInternal } from "src/serializer/mysqlSchema";
3
- import { Connection } from "mysql2/promise";
4
3
  import { IntrospectStage, IntrospectStatus } from "src/cli/views";
4
+ import { DrizzleDbClient } from "src/drivers";
5
5
  export declare const indexName: (tableName: string, columns: string[]) => string;
6
6
  export declare const generateMySqlSnapshot: (tables: AnyMySqlTable[], enums: any[], mysqlSchemas: MySqlSchema[]) => MySqlSchemaInternal;
7
- export declare const fromDatabase: (db: Connection, inputSchema: string, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<MySqlSchemaInternal>;
7
+ export declare const fromDatabase: (db: DrizzleDbClient, inputSchema: string, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<MySqlSchemaInternal>;
@@ -1,4 +1,8 @@
1
1
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
2
+ export declare const prepareFromExports: (exports: Record<string, unknown>) => {
3
+ tables: AnySQLiteTable<{}>[];
4
+ enums: any[];
5
+ };
2
6
  export declare const prepareFromSqliteImports: (imports: string[]) => Promise<{
3
7
  tables: AnySQLiteTable<{}>[];
4
8
  enums: any[];
@@ -0,0 +1,5 @@
1
+ import "./@types/utils";
2
+ import type { ConfigIntrospectCasing } from "./cli/commands/utils";
3
+ import type { SQLiteSchema } from "./serializer/sqliteSchema";
4
+ export declare const indexName: (tableName: string, columns: string[]) => string;
5
+ export declare const schemaToTypeScript: (schema: SQLiteSchema, casing: ConfigIntrospectCasing["casing"]) => string;
package/utils-studio.js CHANGED
@@ -3339,7 +3339,7 @@ var import_hanji3 = __toESM(require_hanji());
3339
3339
  init_views();
3340
3340
  init_pgSerializer();
3341
3341
 
3342
- // src/introspect-pg.ts
3342
+ // src/introspect.ts
3343
3343
  init_pgSerializer();
3344
3344
 
3345
3345
  // src/cli/commands/pgIntrospect.ts
package/utils-studio.mjs CHANGED
@@ -3373,7 +3373,7 @@ var import_hanji3 = __toESM(require_hanji());
3373
3373
  init_views();
3374
3374
  init_pgSerializer();
3375
3375
 
3376
- // src/introspect-pg.ts
3376
+ // src/introspect.ts
3377
3377
  init_pgSerializer();
3378
3378
 
3379
3379
  // src/cli/commands/pgIntrospect.ts
package/utils.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import { Dialect } from "./schemaValidator";
1
+ import type { Dialect } from "./schemaValidator";
2
2
  import { NamedWithSchema } from "./cli/commands/migrate";
3
- import { PgDatabase } from "drizzle-orm/pg-core";
4
- import { PgSchema as PgSchemaKit } from "./serializer/pgSchema";
5
- import { DbConnection } from ".";
6
3
  export declare const assertV1OutFolder: (out: string, dialect: Dialect | "{dialect}") => void;
7
4
  export type Journal = {
8
5
  version: string;
@@ -22,7 +19,6 @@ export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
22
19
  snapshots: string[];
23
20
  journal: any;
24
21
  };
25
- export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
26
22
  export declare const validateWithReport: (snapshots: string[], dialect: Dialect) => {
27
23
  malformed: string[];
28
24
  nonLatest: string[];
@@ -199,13 +195,3 @@ export declare const statementsForDiffs: (in1: any, in2: any) => Promise<{
199
195
  columns: {};
200
196
  } | undefined;
201
197
  }>;
202
- export type DrizzleSnapshotJSON = PgSchemaKit;
203
- export declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => PgSchemaKit;
204
- export declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
205
- export declare const pushSchema: (imports: Record<string, unknown>, db: PgDatabase<any>) => Promise<{
206
- hasDataLoss: boolean;
207
- warnings: string[];
208
- statementsToExecute: string[];
209
- apply: () => Promise<void>;
210
- }>;
211
- export declare const prepareFrom: (connection: DbConnection) => Promise<Record<string, any>>;