Skip to content

Commit 5ba9147

Browse files
Merge branch 'beta' into drizzle-kit/export-sql
2 parents 6743980 + d379dcf commit 5ba9147

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

changelogs/drizzle-orm/0.38.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Closed [[FEATURE]: Add more flexible typing for usage with exactOptionalPropertyTypes](https://github.com/drizzle-team/drizzle-orm/issues/2742)

drizzle-orm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-orm",
3-
"version": "0.38.0",
3+
"version": "0.38.1",
44
"description": "Drizzle ORM package for SQL databases",
55
"type": "module",
66
"scripts": {

drizzle-seed/src/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { BaseSQLiteDatabase, getTableConfig as getSqliteTableConfig, SQLiteTable
1111

1212
import type { AbstractGenerator } from './services/GeneratorsWrappers.ts';
1313
import { generatorsFuncs } from './services/GeneratorsWrappers.ts';
14-
import seedService from './services/SeedService.ts';
14+
import { SeedService } from './services/SeedService.ts';
1515
import type { DrizzleStudioObjectType, DrizzleStudioRelationType } from './types/drizzleStudio.ts';
1616
import type { RefinementsType } from './types/seedService.ts';
1717
import type { Column, Relation, RelationWithReferences, Table } from './types/tables.ts';
@@ -251,6 +251,8 @@ export async function seedForDrizzleStudio(
251251
? schemasRefinements[schemaName]
252252
: undefined;
253253

254+
const seedService = new SeedService();
255+
254256
const generatedTablesGenerators = seedService.generatePossibleGenerators(
255257
sqlDialect,
256258
tables,
@@ -489,6 +491,8 @@ const seedPostgres = async (
489491
options: { count?: number; seed?: number } = {},
490492
refinements?: RefinementsType,
491493
) => {
494+
const seedService = new SeedService();
495+
492496
const { tables, relations, tableRelations } = getPostgresInfo(schema);
493497
const generatedTablesGenerators = seedService.generatePossibleGenerators(
494498
'postgresql',
@@ -740,6 +744,8 @@ const seedMySql = async (
740744
) => {
741745
const { tables, relations, tableRelations } = getMySqlInfo(schema);
742746

747+
const seedService = new SeedService();
748+
743749
const generatedTablesGenerators = seedService.generatePossibleGenerators(
744750
'mysql',
745751
tables,
@@ -927,6 +933,8 @@ const seedSqlite = async (
927933
) => {
928934
const { tables, relations, tableRelations } = getSqliteInfo(schema);
929935

936+
const seedService = new SeedService();
937+
930938
const generatedTablesGenerators = seedService.generatePossibleGenerators(
931939
'sqlite',
932940
tables,
@@ -1072,3 +1080,4 @@ export { default as cities } from './datasets/cityNames.ts';
10721080
export { default as countries } from './datasets/countries.ts';
10731081
export { default as firstNames } from './datasets/firstNames.ts';
10741082
export { default as lastNames } from './datasets/lastNames.ts';
1083+
export { SeedService } from './services/SeedService.ts';

drizzle-seed/src/services/SeedService.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
} from './GeneratorsWrappers.ts';
4343
import { equalSets, generateHashFromString } from './utils.ts';
4444

45-
class SeedService {
45+
export class SeedService {
4646
static readonly [entityKind]: string = 'SeedService';
4747

4848
private defaultCountForTable = 10;
@@ -1470,5 +1470,3 @@ class SeedService {
14701470
}
14711471
};
14721472
}
1473-
1474-
export default new SeedService();

0 commit comments

Comments
 (0)