drizzle-kit 0.20.8 → 0.20.9-1dc10f5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,7 @@
1
1
  import { AnyPgTable, PgEnum, PgSchema } from "drizzle-orm/pg-core";
2
- import { Relations } from "drizzle-orm";
3
2
  import type { IntrospectStage, IntrospectStatus } from "../cli/views";
4
3
  import type { PgSchemaInternal } from "../serializer/pgSchema";
5
4
  import type { DrizzleDbClient } from "../drivers";
6
5
  export declare const indexName: (tableName: string, columns: string[]) => string;
7
6
  export declare const generatePgSnapshot: (tables: AnyPgTable[], enums: PgEnum<any>[], schemas: PgSchema[], schemaFilter?: string[]) => PgSchemaInternal;
8
7
  export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter: ((table: string) => boolean) | undefined, schemaFilters: string[], progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<PgSchemaInternal>;
9
- export declare const toDrizzle: (schema: PgSchemaInternal, schemaName: string) => Record<string, AnyPgTable | Relations>;
@@ -0,0 +1,7 @@
1
+ import { Relations } from "drizzle-orm";
2
+ import { AnyPgTable } from "drizzle-orm/pg-core";
3
+ import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
+ import type { PgSchemaInternal } from "./pgSchema";
5
+ import type { SQLiteSchemaInternal } from "./sqliteSchema";
6
+ export declare const pgSchemaToDrizzle: (schema: PgSchemaInternal, schemaName: string) => Record<string, AnyPgTable | Relations>;
7
+ export declare const sqliteSchemaToDrizzle: (schema: SQLiteSchemaInternal) => Record<string, AnySQLiteTable | Relations>;
@@ -1,8 +1,6 @@
1
1
  import type { SQLiteSchemaInternal } from "../serializer/sqliteSchema";
2
- import { Relations } from "drizzle-orm";
3
2
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
3
  import type { IntrospectStage, IntrospectStatus } from "src/cli/views";
5
4
  import type { DrizzleDbClient } from "src/drivers";
6
5
  export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[], enums: any[]) => SQLiteSchemaInternal;
7
6
  export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<SQLiteSchemaInternal>;
8
- export declare const toDrizzle: (schema: SQLiteSchemaInternal) => Record<string, AnySQLiteTable | Relations>;
@@ -21,7 +21,7 @@ export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
21
21
  export declare const prepareModels: (path: string | string[]) => Promise<{
22
22
  pgSchema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
23
23
  mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
24
- sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>>;
24
+ sqliteSchema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
25
25
  }>;
26
26
  export declare const drizzleForPostgres: (connectionConfig: PgConnectionConfig, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>, ts: {
27
27
  imports: string;
@@ -53,13 +53,13 @@ export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models:
53
53
  } | {
54
54
  db: import("../orm-extenstions/d1-driver/driver").DrizzleD1WranglerDatabase<Record<string, never>>;
55
55
  type: "sqlite";
56
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
56
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
57
57
  } | {
58
58
  db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
59
59
  type: "sqlite";
60
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
60
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
61
61
  } | {
62
62
  db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
63
63
  type: "sqlite";
64
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
64
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
65
65
  }>;
@@ -1,5 +1,5 @@
1
- export { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
2
- export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
1
+ export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
+ export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
3
3
  export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
4
  export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
5
5
  export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
package/utils-studio.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
2
- export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
1
+ export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
+ export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
3
3
  export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
4
  export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
5
5
  export { DrizzleORMPgClient, TursoSqlite } from "./drivers";