drizzle-seed 0.4.0-08bb2d5 → 0.4.0-2d0c9fd
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/cockroach-core/index.d.cts +8 -2
- package/cockroach-core/index.d.mts +8 -2
- package/cockroach-core/index.d.ts +8 -2
- package/common.d.cts +25 -0
- package/common.d.mts +25 -0
- package/common.d.ts +25 -0
- package/generators/Generators.d.cts +2 -2
- package/generators/Generators.d.mts +2 -2
- package/generators/Generators.d.ts +2 -2
- package/generators/versioning/v2.d.cts +2 -2
- package/generators/versioning/v2.d.mts +2 -2
- package/generators/versioning/v2.d.ts +2 -2
- package/index.cjs +503 -1049
- package/index.cjs.map +1 -1
- package/index.d.cts +8 -82
- package/index.d.mts +8 -82
- package/index.d.ts +8 -82
- package/index.mjs +508 -1054
- 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 +8 -2
- package/mysql-core/index.d.mts +8 -2
- package/mysql-core/index.d.ts +8 -2
- package/package.json +3 -3
- package/pg-core/index.d.cts +8 -2
- package/pg-core/index.d.mts +8 -2
- package/pg-core/index.d.ts +8 -2
- package/singlestore-core/index.d.cts +8 -2
- package/singlestore-core/index.d.mts +8 -2
- package/singlestore-core/index.d.ts +8 -2
- package/sqlite-core/index.d.cts +8 -2
- package/sqlite-core/index.d.mts +8 -2
- package/sqlite-core/index.d.ts +8 -2
- package/types/seedService.d.cts +1 -1
- package/types/seedService.d.mts +1 -1
- package/types/seedService.d.ts +1 -1
- package/types/tables.d.cts +15 -0
- package/types/tables.d.mts +15 -0
- package/types/tables.d.ts +15 -0
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 { Table, 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,8 @@ 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 mapMySqlTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapMySqlTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapMySqlTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-seed",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-2d0c9fd",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsx scripts/build.ts",
|
|
7
|
+
"build": "tsc -p ./tsconfig.json && tsx scripts/build.ts",
|
|
8
8
|
"pack": "(cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
|
|
9
9
|
"test": "vitest --config ./vitest.config.ts",
|
|
10
10
|
"test:types": "cd type-tests && tsc -p ./../tsconfig.json",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"drizzle-orm": ">=0.
|
|
68
|
+
"drizzle-orm": ">=1.0.0-beta.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"drizzle-orm": {
|
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 { Table, 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,8 @@ 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 mapPgTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapPgTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapPgTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
|
@@ -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 { Table, 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,8 @@ 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 mapSingleStoreTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
|
@@ -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 { Table, 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,8 @@ 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 mapSingleStoreTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
|
@@ -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 { Table, 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,8 @@ 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 mapSingleStoreTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapSqliteTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapSqliteTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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 { Table, 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,8 @@ 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 mapSqliteTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
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<{
|
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<{
|
package/types/seedService.d.ts
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<{
|
package/types/tables.d.cts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -39,3 +46,11 @@ export type RelationWithReferences = Relation & {
|
|
|
39
46
|
export type Prettify<T> = {
|
|
40
47
|
[K in keyof T]: T[K];
|
|
41
48
|
} & {};
|
|
49
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
50
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
51
|
+
export type TableConfigT = {
|
|
52
|
+
name: string;
|
|
53
|
+
schema?: string;
|
|
54
|
+
columns: AnyColumn[];
|
|
55
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
56
|
+
};
|
package/types/tables.d.mts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -39,3 +46,11 @@ export type RelationWithReferences = Relation & {
|
|
|
39
46
|
export type Prettify<T> = {
|
|
40
47
|
[K in keyof T]: T[K];
|
|
41
48
|
} & {};
|
|
49
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
50
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
51
|
+
export type TableConfigT = {
|
|
52
|
+
name: string;
|
|
53
|
+
schema?: string;
|
|
54
|
+
columns: AnyColumn[];
|
|
55
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
56
|
+
};
|
package/types/tables.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -39,3 +46,11 @@ export type RelationWithReferences = Relation & {
|
|
|
39
46
|
export type Prettify<T> = {
|
|
40
47
|
[K in keyof T]: T[K];
|
|
41
48
|
} & {};
|
|
49
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
50
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
51
|
+
export type TableConfigT = {
|
|
52
|
+
name: string;
|
|
53
|
+
schema?: string;
|
|
54
|
+
columns: AnyColumn[];
|
|
55
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
56
|
+
};
|