forked from w3tecch/typeorm-seeding
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove factory helper methods and test associateds (#30)
BREAKING CHANGE: Helper methods removed were a core part of previous versions
- Loading branch information
1 parent
ddb5c2f
commit 3393724
Showing
19 changed files
with
2 additions
and
381 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { fetchConnection } from './connection' | ||
import { factory } from './factoriesMap' | ||
import { Seeder } from './seeder' | ||
|
||
export async function runSeeder(seeder: Seeder) { | ||
const connection = await fetchConnection() | ||
seeder.run(factory, connection) | ||
seeder.run(connection) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { Connection } from 'typeorm' | ||
import { EntityFactory } from './types' | ||
|
||
export abstract class Seeder { | ||
abstract run(factory: EntityFactory, connection: Connection): Promise<void> | ||
abstract run(connection: Connection): Promise<void> | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.