Skip to content

Commit

Permalink
fix: migrator and seedmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Feb 23, 2023
1 parent b867e4c commit 4b57d24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@afetcan/storage",
"private": false,
"type": "module",
"version": "0.0.24",
"version": "0.0.25",
"description": "Storage for afetcan.com",
"author": "Mehmet - productdevbook <[email protected]>",
"license": "MIT",
Expand Down
6 changes: 5 additions & 1 deletion src/createMikroORMPostgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import { SqlHighlighter } from '@mikro-orm/sql-highlighter'
import zod from 'zod'
import { config } from 'dotenv'
import { diary, enable, error, info } from 'diary'
import { entities } from './entity'

import { Migrator } from '@mikro-orm/migrations'
import { SeedManager } from '@mikro-orm/seeder'
import { DatabaseSeeder } from './seeders/DatabaseSeeder'
import { entities } from './entity'

enable('*')

Expand Down Expand Up @@ -196,6 +199,7 @@ export async function createMikroORMPostgress(config: Config): Promise<MikroORM>
seeder: {
path: join(distPath, 'seeders'),
},
extensions: [Migrator, SeedManager],
migrations: {
path: join(distPath, 'migrations'),
pathTs: join(distPath, 'migrations'),
Expand Down

0 comments on commit 4b57d24

Please sign in to comment.