drizzle-kit 0.20.17-ff96495 → 0.20.18-d190692

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/bin.cjs +34362 -27214
  2. package/index.d.mts +30 -60
  3. package/index.d.ts +30 -60
  4. package/package.json +5 -16
  5. package/payload.d.mts +1052 -18
  6. package/payload.d.ts +1052 -18
  7. package/payload.js +19139 -16812
  8. package/payload.mjs +19166 -16821
  9. package/utils-studio.js +41 -20
  10. package/utils-studio.mjs +41 -20
  11. package/utils.js +30 -14
  12. package/utils.mjs +30 -14
  13. package/@types/utils.d.ts +0 -12
  14. package/cli/commands/migrate.d.ts +0 -287
  15. package/cli/commands/mysqlIntrospect.d.ts +0 -50
  16. package/cli/commands/mysqlPushUtils.d.ts +0 -14
  17. package/cli/commands/pgIntrospect.d.ts +0 -59
  18. package/cli/commands/pgPushUtils.d.ts +0 -11
  19. package/cli/commands/sqliteIntrospect.d.ts +0 -103
  20. package/cli/commands/sqlitePushUtils.d.ts +0 -15
  21. package/cli/commands/utils.d.ts +0 -58
  22. package/cli/connections.d.ts +0 -13
  23. package/cli/selector-ui.d.ts +0 -13
  24. package/cli/utils.d.ts +0 -13
  25. package/cli/validations/cli.d.ts +0 -169
  26. package/cli/validations/common.d.ts +0 -214
  27. package/cli/validations/mysql.d.ts +0 -29
  28. package/cli/validations/outputs.d.ts +0 -42
  29. package/cli/validations/pg.d.ts +0 -46
  30. package/cli/validations/sqlite.d.ts +0 -22
  31. package/cli/views.d.ts +0 -63
  32. package/global.d.ts +0 -6
  33. package/introspect-sqlite.d.ts +0 -10
  34. package/jsonDiffer.d.ts +0 -61
  35. package/jsonStatements.d.ts +0 -376
  36. package/migrationPreparator.d.ts +0 -35
  37. package/schemaValidator.d.ts +0 -1316
  38. package/serializer/index.d.ts +0 -9
  39. package/serializer/mysqlImports.d.ts +0 -7
  40. package/serializer/mysqlSchema.d.ts +0 -4650
  41. package/serializer/mysqlSerializer.d.ts +0 -7
  42. package/serializer/pgImports.d.ts +0 -11
  43. package/serializer/pgSchema.d.ts +0 -4792
  44. package/serializer/pgSerializer.d.ts +0 -7
  45. package/serializer/schemaToDrizzle.d.ts +0 -7
  46. package/serializer/sqliteImports.d.ts +0 -7
  47. package/serializer/sqliteSchema.d.ts +0 -2801
  48. package/serializer/sqliteSerializer.d.ts +0 -6
  49. package/serializer/studio.d.ts +0 -51
  50. package/snapshotsDiffer.d.ts +0 -3937
  51. package/sqlgenerator.d.ts +0 -33
  52. package/utils/words.d.ts +0 -7
  53. package/utils-studio.d.mts +0 -4
  54. package/utils-studio.d.ts +0 -4
  55. package/utils.d.ts +0 -78
package/sqlgenerator.d.ts DELETED
@@ -1,33 +0,0 @@
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 {};
package/utils/words.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export declare const prepareMigrationMetadata: (idx: number, name?: string) => {
2
- prefix: string;
3
- suffix: string;
4
- tag: string;
5
- };
6
- export declare const adjectives: string[];
7
- export declare const heroes: string[];
@@ -1,4 +0,0 @@
1
- export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
- export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
3
- export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
- export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
package/utils-studio.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
- export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
3
- export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
- export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
package/utils.d.ts DELETED
@@ -1,78 +0,0 @@
1
- import type { Dialect } from "./schemaValidator";
2
- import type { NamedWithSchema } from "./cli/commands/migrate";
3
- import type { ProxyParams } from "./serializer/studio";
4
- import type { RunResult } from "better-sqlite3";
5
- export type Proxy = (params: ProxyParams) => Promise<any[]>;
6
- export type SqliteProxy = {
7
- proxy: (params: ProxyParams) => Promise<any[] | RunResult>;
8
- };
9
- export type DB = {
10
- query: <T extends any = any>(sql: string, params?: any[]) => Promise<T[]>;
11
- };
12
- export type SQLiteDB = {
13
- query: <T extends any = any>(sql: string, params?: any[]) => Promise<T[]>;
14
- run(query: string): Promise<void>;
15
- };
16
- export declare const copy: <T>(it: T) => T;
17
- export declare const objectValues: <T extends object>(obj: T) => Array<T[keyof T]>;
18
- export declare const assertV1OutFolder: (out: string) => void;
19
- export type Journal = {
20
- version: string;
21
- dialect: Dialect;
22
- entries: {
23
- idx: number;
24
- version: string;
25
- when: number;
26
- tag: string;
27
- breakpoints: boolean;
28
- }[];
29
- };
30
- export declare const dryJournal: (dialect: Dialect) => Journal;
31
- export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
32
- meta: string;
33
- snapshots: string[];
34
- journal: any;
35
- };
36
- export declare const validateWithReport: (snapshots: string[], dialect: Dialect) => {
37
- malformed: string[];
38
- nonLatest: string[];
39
- idsMap: Record<string, {
40
- parent: string;
41
- snapshots: string[];
42
- }>;
43
- rawMap: Record<string, any>;
44
- };
45
- export declare const prepareMigrationFolder: (outFolder: string | undefined, dialect: Dialect) => {
46
- snapshots: string[];
47
- journal: any;
48
- };
49
- export declare const prepareMigrationMeta: (schemas: {
50
- from: string;
51
- to: string;
52
- }[], tables: {
53
- from: NamedWithSchema;
54
- to: NamedWithSchema;
55
- }[], columns: {
56
- from: {
57
- table: string;
58
- schema: string;
59
- column: string;
60
- };
61
- to: {
62
- table: string;
63
- schema: string;
64
- column: string;
65
- };
66
- }[]) => {
67
- schemas: Record<string, string>;
68
- tables: Record<string, string>;
69
- columns: Record<string, string>;
70
- };
71
- export declare const schemaRenameKey: (it: string) => string;
72
- export declare const tableRenameKey: (it: NamedWithSchema) => string;
73
- export declare const columnRenameKey: (table: string, schema: string, column: string) => string;
74
- export declare const kloudMeta: () => {
75
- pg: number[];
76
- mysql: number[];
77
- sqlite: number[];
78
- };