drizzle-seed 0.4.0-08bb2d5 → 0.4.0-0ec754e
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/SeedService.d.cts +1 -0
- package/SeedService.d.mts +1 -0
- package/SeedService.d.ts +1 -0
- package/cockroach-core/index.d.cts +6 -2
- package/cockroach-core/index.d.mts +6 -2
- package/cockroach-core/index.d.ts +6 -2
- package/common.d.cts +23 -0
- package/common.d.mts +23 -0
- package/common.d.ts +23 -0
- package/generators/GeneratorFuncs.d.cts +888 -28
- package/generators/GeneratorFuncs.d.mts +888 -28
- package/generators/GeneratorFuncs.d.ts +888 -28
- package/generators/Generators.d.cts +149 -44
- package/generators/Generators.d.mts +149 -44
- package/generators/Generators.d.ts +149 -44
- package/generators/apiVersion.d.cts +1 -1
- package/generators/apiVersion.d.mts +1 -1
- package/generators/apiVersion.d.ts +1 -1
- package/generators/versioning/v2.d.cts +13 -6
- package/generators/versioning/v2.d.mts +13 -6
- package/generators/versioning/v2.d.ts +13 -6
- package/generators/versioning/v3.d.cts +10 -0
- package/generators/versioning/v3.d.mts +10 -0
- package/generators/versioning/v3.d.ts +10 -0
- package/index.cjs +1122 -1186
- package/index.cjs.map +1 -1
- package/index.d.cts +13 -99
- package/index.d.mts +13 -99
- package/index.d.ts +13 -99
- package/index.mjs +1127 -1191
- package/index.mjs.map +1 -1
- package/mssql-core/index.d.cts +2 -2
- package/mssql-core/index.d.mts +2 -2
- package/mssql-core/index.d.ts +2 -2
- package/mysql-core/index.d.cts +6 -2
- package/mysql-core/index.d.mts +6 -2
- package/mysql-core/index.d.ts +6 -2
- package/package.json +108 -107
- package/pg-core/index.d.cts +6 -2
- package/pg-core/index.d.mts +6 -2
- package/pg-core/index.d.ts +6 -2
- package/singlestore-core/index.d.cts +6 -2
- package/singlestore-core/index.d.mts +6 -2
- package/singlestore-core/index.d.ts +6 -2
- package/sqlite-core/index.d.cts +6 -2
- package/sqlite-core/index.d.mts +6 -2
- package/sqlite-core/index.d.ts +6 -2
- package/types/seedService.d.cts +2 -2
- package/types/seedService.d.mts +2 -2
- package/types/seedService.d.ts +2 -2
- package/types/tables.d.cts +18 -0
- package/types/tables.d.mts +18 -0
- package/types/tables.d.ts +18 -0
- package/utils.d.cts +0 -1
- package/utils.d.mts +0 -1
- package/utils.d.ts +0 -1
package/mssql-core/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
3
|
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
@@ -9,7 +9,7 @@ export declare const filterMsSqlTables: (schema: {
|
|
|
9
9
|
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
10
|
}) => {
|
|
11
11
|
mssqlSchema: {
|
|
12
|
-
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
13
|
};
|
|
14
14
|
mssqlTables: {
|
|
15
15
|
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
package/mssql-core/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
3
|
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
@@ -9,7 +9,7 @@ export declare const filterMsSqlTables: (schema: {
|
|
|
9
9
|
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
10
|
}) => {
|
|
11
11
|
mssqlSchema: {
|
|
12
|
-
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
13
|
};
|
|
14
14
|
mssqlTables: {
|
|
15
15
|
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
package/mssql-core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
3
|
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
@@ -9,7 +9,7 @@ export declare const filterMsSqlTables: (schema: {
|
|
|
9
9
|
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
10
|
}) => {
|
|
11
11
|
mssqlSchema: {
|
|
12
|
-
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
13
|
};
|
|
14
14
|
mssqlTables: {
|
|
15
15
|
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
package/mysql-core/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
3
|
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: MySqlTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterMysqlTables: (schema: {
|
|
|
9
10
|
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
mysqlSchema: {
|
|
12
|
-
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
mysqlTables: {
|
|
15
16
|
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/mysql-core/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
3
|
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: MySqlTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterMysqlTables: (schema: {
|
|
|
9
10
|
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
mysqlSchema: {
|
|
12
|
-
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
mysqlTables: {
|
|
15
16
|
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/mysql-core/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
3
|
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: MySqlTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterMysqlTables: (schema: {
|
|
|
9
10
|
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
mysqlSchema: {
|
|
12
|
-
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
mysqlTables: {
|
|
15
16
|
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/package.json
CHANGED
|
@@ -1,109 +1,110 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
2
|
+
"name": "drizzle-seed",
|
|
3
|
+
"version": "0.4.0-0ec754e",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -p ./tsconfig.json && tsx scripts/build.ts",
|
|
8
|
+
"build:artifact": "pnpm run build",
|
|
9
|
+
"pack": "(cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
|
|
10
|
+
"pack:artifact": "pnpm run pack",
|
|
11
|
+
"test": "vitest --config ./vitest.config.ts",
|
|
12
|
+
"test:types": "cd type-tests && tsc -p ./../tsconfig.json",
|
|
13
|
+
"generate-for-tests:pg": "drizzle-kit generate --config=./src/tests/pg/drizzle.config.ts",
|
|
14
|
+
"generate-for-tests:mysql": "drizzle-kit generate --config=./src/tests/mysql/drizzle.config.ts",
|
|
15
|
+
"generate-for-tests:sqlite": "drizzle-kit generate --config=./src/tests/sqlite/drizzle.config.ts",
|
|
16
|
+
"generate": "drizzle-kit generate",
|
|
17
|
+
"start": "npx tsx ./src/dev/test.ts",
|
|
18
|
+
"start:pg": "npx tsx ./src/tests/northwind/pgTest.ts",
|
|
19
|
+
"start:mysql": "npx tsx ./src/tests/northwind/mysqlTest.ts",
|
|
20
|
+
"start:sqlite": "npx tsx ./src/tests/northwind/sqliteTest.ts",
|
|
21
|
+
"benchmark": "npx tsx ./src/tests/benchmarks/generatorsBenchmark.ts",
|
|
22
|
+
"publish": "npm publish package.tgz"
|
|
23
|
+
},
|
|
24
|
+
"author": "Drizzle Team",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/drizzle-team/drizzle-orm/issues"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"drizzle",
|
|
31
|
+
"orm",
|
|
32
|
+
"pg",
|
|
33
|
+
"mysql",
|
|
34
|
+
"postgresql",
|
|
35
|
+
"postgres",
|
|
36
|
+
"sqlite",
|
|
37
|
+
"database",
|
|
38
|
+
"sql",
|
|
39
|
+
"typescript",
|
|
40
|
+
"ts",
|
|
41
|
+
"drizzle-orm",
|
|
42
|
+
"drizzle-seed",
|
|
43
|
+
"seeding",
|
|
44
|
+
"seed"
|
|
45
|
+
],
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/drizzle-team/drizzle-orm.git"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"provenance": true
|
|
52
|
+
},
|
|
53
|
+
"sideEffects": false,
|
|
54
|
+
"description": "A package to seed your database using Drizzle ORM",
|
|
55
|
+
"exports": {
|
|
56
|
+
".": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./index.d.mts",
|
|
59
|
+
"default": "./index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./index.d.cjs",
|
|
63
|
+
"default": "./index.cjs"
|
|
64
|
+
},
|
|
65
|
+
"types": "./index.d.ts",
|
|
66
|
+
"default": "./index.mjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"drizzle-orm": ">=1.0.0-beta.1"
|
|
71
|
+
},
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"drizzle-orm": {
|
|
74
|
+
"optional": false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@arethetypeswrong/cli": "^0.16.1",
|
|
79
|
+
"@electric-sql/pglite": "^0.2.12",
|
|
80
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
81
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
82
|
+
"@types/async-retry": "^1.4.8",
|
|
83
|
+
"@types/better-sqlite3": "^7.6.11",
|
|
84
|
+
"@types/dockerode": "^3.3.31",
|
|
85
|
+
"@types/mssql": "^9.1.4",
|
|
86
|
+
"@types/node": "^22.5.4",
|
|
87
|
+
"@types/pg": "^8.11.6",
|
|
88
|
+
"@types/uuid": "^10.0.0",
|
|
89
|
+
"async-retry": "^1.3.3",
|
|
90
|
+
"better-sqlite3": "^11.1.2",
|
|
91
|
+
"cpy": "^11.1.0",
|
|
92
|
+
"dockerode": "^4.0.6",
|
|
93
|
+
"dotenv": "^16.4.5",
|
|
94
|
+
"drizzle-kit": "workspace:./drizzle-kit/dist",
|
|
95
|
+
"drizzle-orm": "workspace:./drizzle-orm/dist",
|
|
96
|
+
"get-port": "^7.1.0",
|
|
97
|
+
"mssql": "^11.0.1",
|
|
98
|
+
"mysql2": "^3.14.1",
|
|
99
|
+
"pg": "^8.12.0",
|
|
100
|
+
"resolve-tspaths": "^0.8.19",
|
|
101
|
+
"rollup": "^3.29.5",
|
|
102
|
+
"tslib": "^2.7.0",
|
|
103
|
+
"tsx": "^4.19.0",
|
|
104
|
+
"uuid": "^10.0.0",
|
|
105
|
+
"zx": "^8.1.5"
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"pure-rand": "^6.1.0"
|
|
109
|
+
}
|
|
109
110
|
}
|
package/pg-core/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
6
7
|
[key: string]: PgTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterPgSchema: (schema: {
|
|
|
9
10
|
[key: string]: PgTable | PgSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
pgSchema: {
|
|
12
|
-
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
pgTables: {
|
|
15
16
|
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/pg-core/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
6
7
|
[key: string]: PgTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterPgSchema: (schema: {
|
|
|
9
10
|
[key: string]: PgTable | PgSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
pgSchema: {
|
|
12
|
-
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
pgTables: {
|
|
15
16
|
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/pg-core/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
6
7
|
[key: string]: PgTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterPgSchema: (schema: {
|
|
|
9
10
|
[key: string]: PgTable | PgSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
pgSchema: {
|
|
12
|
-
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
pgTables: {
|
|
15
16
|
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
3
|
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SingleStoreTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSingleStoreTables: (schema: {
|
|
|
9
10
|
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
singleStoreSchema: {
|
|
12
|
-
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
singleStoreTables: {
|
|
15
16
|
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
3
|
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SingleStoreTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSingleStoreTables: (schema: {
|
|
|
9
10
|
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
singleStoreSchema: {
|
|
12
|
-
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
singleStoreTables: {
|
|
15
16
|
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
3
|
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SingleStoreTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSingleStoreTables: (schema: {
|
|
|
9
10
|
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
singleStoreSchema: {
|
|
12
|
-
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
singleStoreTables: {
|
|
15
16
|
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/sqlite-core/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
3
|
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SQLiteTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSqliteTables: (schema: {
|
|
|
9
10
|
[key: string]: SQLiteTable | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
sqliteSchema: {
|
|
12
|
-
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
sqliteTables: {
|
|
15
16
|
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/sqlite-core/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
3
|
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SQLiteTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSqliteTables: (schema: {
|
|
|
9
10
|
[key: string]: SQLiteTable | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
sqliteSchema: {
|
|
12
|
-
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
sqliteTables: {
|
|
15
16
|
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/sqlite-core/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
3
|
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
6
7
|
[key: string]: SQLiteTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterSqliteTables: (schema: {
|
|
|
9
10
|
[key: string]: SQLiteTable | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
sqliteSchema: {
|
|
12
|
-
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
sqliteTables: {
|
|
15
16
|
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
@@ -22,3 +23,6 @@ export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
package/types/seedService.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import type { BaseSQLiteDatabase, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
|
7
7
|
import type { AbstractGenerator } from '../generators/Generators.js';
|
|
8
8
|
import type { Prettify } from './tables.js';
|
|
9
9
|
export type GeneratedValueType = number | bigint | string | Buffer | boolean | undefined;
|
|
10
|
-
export type DbType = PgDatabase<any, any> | MySqlDatabase<any, any> | BaseSQLiteDatabase<any, any> | MsSqlDatabase<any, any> | CockroachDatabase<any, any> | SingleStoreDatabase<any, any>;
|
|
10
|
+
export type DbType = PgDatabase<any, any, any> | MySqlDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MsSqlDatabase<any, any, any, any> | CockroachDatabase<any, any, any> | SingleStoreDatabase<any, any, any, any>;
|
|
11
11
|
export type TableType = PgTable | MySqlTable | SQLiteTable | MsSqlTable | CockroachTable | SingleStoreTable;
|
|
12
12
|
export type TableGeneratorsType = {
|
|
13
13
|
[columnName: string]: Prettify<{
|
|
@@ -47,7 +47,7 @@ export type RefinementsType = Prettify<{
|
|
|
47
47
|
[tableName: string]: {
|
|
48
48
|
count?: number;
|
|
49
49
|
columns: {
|
|
50
|
-
[columnName: string]: AbstractGenerator<{}
|
|
50
|
+
[columnName: string]: AbstractGenerator<{}> | false;
|
|
51
51
|
};
|
|
52
52
|
with?: {
|
|
53
53
|
[tableName: string]: number | {
|
package/types/seedService.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ import type { BaseSQLiteDatabase, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
|
7
7
|
import type { AbstractGenerator } from '../generators/Generators.js';
|
|
8
8
|
import type { Prettify } from './tables.js';
|
|
9
9
|
export type GeneratedValueType = number | bigint | string | Buffer | boolean | undefined;
|
|
10
|
-
export type DbType = PgDatabase<any, any> | MySqlDatabase<any, any> | BaseSQLiteDatabase<any, any> | MsSqlDatabase<any, any> | CockroachDatabase<any, any> | SingleStoreDatabase<any, any>;
|
|
10
|
+
export type DbType = PgDatabase<any, any, any> | MySqlDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MsSqlDatabase<any, any, any, any> | CockroachDatabase<any, any, any> | SingleStoreDatabase<any, any, any, any>;
|
|
11
11
|
export type TableType = PgTable | MySqlTable | SQLiteTable | MsSqlTable | CockroachTable | SingleStoreTable;
|
|
12
12
|
export type TableGeneratorsType = {
|
|
13
13
|
[columnName: string]: Prettify<{
|
|
@@ -47,7 +47,7 @@ export type RefinementsType = Prettify<{
|
|
|
47
47
|
[tableName: string]: {
|
|
48
48
|
count?: number;
|
|
49
49
|
columns: {
|
|
50
|
-
[columnName: string]: AbstractGenerator<{}
|
|
50
|
+
[columnName: string]: AbstractGenerator<{}> | false;
|
|
51
51
|
};
|
|
52
52
|
with?: {
|
|
53
53
|
[tableName: string]: number | {
|