drizzle-kit 0.20.0-baf960c → 0.20.0-f28522c
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/utils.d.ts +12 -0
- package/cli/commands/migrate.d.ts +260 -0
- package/cli/commands/mysqlUp.d.ts +4 -0
- package/cli/commands/pgIntrospect.d.ts +118 -0
- package/cli/commands/pgPushUtils.d.ts +14 -0
- package/cli/commands/pgUp.d.ts +4 -0
- package/cli/commands/sqliteIntrospect.d.ts +102 -0
- package/cli/commands/sqliteUtils.d.ts +162 -0
- package/cli/commands/upFolders.d.ts +27 -0
- package/cli/commands/utils.d.ts +265 -0
- package/cli/selector-ui.d.ts +13 -0
- package/cli/validations/common.d.ts +13 -0
- package/cli/validations/mysql.d.ts +414 -0
- package/cli/validations/outputs.d.ts +40 -0
- package/cli/validations/pg.d.ts +438 -0
- package/cli/validations/sqlite.d.ts +220 -0
- package/cli/validations/studio.d.ts +548 -0
- package/cli/views.d.ts +61 -0
- package/drivers/index.d.ts +25 -0
- package/global.d.ts +2 -0
- package/index.cjs +28551 -37099
- package/index.d.ts +47 -1
- package/introspect.d.ts +4 -0
- package/jsonDiffer.d.ts +76 -0
- package/jsonStatements.d.ts +349 -0
- package/migrationPreparator.d.ts +35 -0
- package/orm-extenstions/d1-driver/driver.d.ts +8 -0
- package/orm-extenstions/d1-driver/session.d.ts +52 -0
- package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
- package/package.json +4 -3
- package/schemaValidator.d.ts +1306 -0
- package/serializer/index.d.ts +9 -0
- package/serializer/mysqlImports.d.ts +6 -0
- package/serializer/mysqlSchema.d.ts +3833 -0
- package/serializer/mysqlSerializer.d.ts +7 -0
- package/serializer/pgImports.d.ts +11 -0
- package/serializer/pgSchema.d.ts +4244 -0
- package/serializer/pgSerializer.d.ts +7 -0
- package/serializer/sqliteImports.d.ts +5 -0
- package/serializer/sqliteSchema.d.ts +3227 -0
- package/serializer/sqliteSerializer.d.ts +8 -0
- package/serializer/studioUtils.d.ts +35 -0
- package/snapshotsDiffer.d.ts +2660 -0
- package/sqlgenerator.d.ts +33 -0
- package/sqlite-introspect.d.ts +5 -0
- package/utils/words.d.ts +7 -0
- package/utils.d.ts +33 -0
- package/utils.js +51596 -11744
- package/utilsR.d.ts +232 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
import { JsonCreateIndexStatement, JsonDropIndexStatement, JsonDropTableStatement, JsonRenameTableStatement, JsonSqliteAddColumnStatement, JsonSqliteCreateTableStatement, JsonStatement } from "./jsonStatements";
|
2
|
+
import { Dialect } from "./schemaValidator";
|
3
|
+
export declare const pgNativeTypes: Set<string>;
|
4
|
+
declare abstract class Convertor {
|
5
|
+
abstract can(statement: JsonStatement, dialect: Dialect): boolean;
|
6
|
+
abstract convert(statement: JsonStatement): string;
|
7
|
+
}
|
8
|
+
export declare class SQLiteCreateTableConvertor extends Convertor {
|
9
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
10
|
+
convert(st: JsonSqliteCreateTableStatement): string;
|
11
|
+
}
|
12
|
+
export declare class SQLiteDropTableConvertor extends Convertor {
|
13
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
14
|
+
convert(statement: JsonDropTableStatement): string;
|
15
|
+
}
|
16
|
+
export declare class SqliteRenameTableConvertor extends Convertor {
|
17
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
18
|
+
convert(statement: JsonRenameTableStatement): string;
|
19
|
+
}
|
20
|
+
export declare class SQLiteAlterTableAddColumnConvertor extends Convertor {
|
21
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
22
|
+
convert(statement: JsonSqliteAddColumnStatement): string;
|
23
|
+
}
|
24
|
+
export declare class CreateSqliteIndexConvertor extends Convertor {
|
25
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
26
|
+
convert(statement: JsonCreateIndexStatement): string;
|
27
|
+
}
|
28
|
+
export declare class SqliteDropIndexConvertor extends Convertor {
|
29
|
+
can(statement: JsonStatement, dialect: Dialect): boolean;
|
30
|
+
convert(statement: JsonDropIndexStatement): string;
|
31
|
+
}
|
32
|
+
export declare const fromJson: (statements: JsonStatement[], dialect: Dialect) => string[];
|
33
|
+
export {};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import "./@types/utils";
|
2
|
+
import { ConfigIntrospectCasing } from "./cli/commands/utils";
|
3
|
+
import { 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/words.d.ts
ADDED
package/utils.d.ts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
2
|
+
import { Relations } from "drizzle-orm";
|
3
|
+
import { AnyPgTable, PgDatabase } from "drizzle-orm/pg-core";
|
4
|
+
import { Config, DbConnection } from ".";
|
5
|
+
import { PgSchema } from "./serializer/pgSchema";
|
6
|
+
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
7
|
+
export type DrizzleSnapshotJSON = PgSchema;
|
8
|
+
export declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => DrizzleSnapshotJSON;
|
9
|
+
export declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
10
|
+
export declare const pushSchema: (imports: Record<string, unknown>, db: PgDatabase<any>) => Promise<{
|
11
|
+
hasDataLoss: boolean;
|
12
|
+
warnings: string[];
|
13
|
+
statementsToExecute: string[];
|
14
|
+
apply: () => Promise<void>;
|
15
|
+
}>;
|
16
|
+
export declare const prepareFrom: (connection: DbConnection) => Promise<{
|
17
|
+
db: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>>;
|
18
|
+
type: "pg";
|
19
|
+
schema: Record<string, AnyPgTable<{}> | Relations>;
|
20
|
+
} | {
|
21
|
+
db: import("drizzle-orm/mysql2").MySql2Database<Record<string, never>>;
|
22
|
+
type: "mysql2";
|
23
|
+
schema: Record<string, AnyMySqlTable<{}> | Relations>;
|
24
|
+
} | {
|
25
|
+
db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
|
26
|
+
type: "sqlite";
|
27
|
+
schema: Record<string, AnySQLiteTable<{}> | Relations>;
|
28
|
+
} | {
|
29
|
+
db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
|
30
|
+
type: "sqlite";
|
31
|
+
schema: Record<string, AnySQLiteTable<{}> | Relations>;
|
32
|
+
}>;
|
33
|
+
export declare function defineConfig(config: Config): Config;
|