Skip to content

Commit

Permalink
build: Fix typeorm CLI config
Browse files Browse the repository at this point in the history
  • Loading branch information
benscobie committed Dec 20, 2024
1 parent bd7ba9f commit e947369
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"test:e2e": "jest --config ./test/jest-e2e.json",
"migration:run": "ts-node node_modules/typeorm/cli.js migration:run -d ./src/datasource-config.ts",
"migration:revert": "ts-node node_modules/typeorm/cli.js migration:revert -d ./src/datasource-config.ts",
"migration:generate": "ts-node node_modules/typeorm/cli.js migration:generate --dataSource ./src/datasource-config.ts -p"
"migration:generate": "ts-node node_modules/typeorm/cli.js migration:generate --dataSource ./src/datasource-config.ts -p",
"migration:show": "ts-node node_modules/typeorm/cli.js migration:show --dataSource ./src/datasource-config.ts"
},
"dependencies": {
"@nestjs/common": "^10.4.15",
Expand Down
2 changes: 1 addition & 1 deletion server/src/datasource-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DataSource } from 'typeorm';

const datasource = new DataSource({
type: 'sqlite',
database: './data/maintainerr.sqlite',
database: '../data/maintainerr.sqlite',
entities: ['./dist/**/*.entities{.ts,.js}'],
synchronize: false,
migrationsTableName: 'migrations',
Expand Down
2 changes: 1 addition & 1 deletion typeorm_instructions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// After each new entity, generate migration
yarn migration:generate server/src/database/migrations/<migr_name>
yarn migration:generate src/database/migrations/<migr_name>

// Run migrations
yarn migration:run
Expand Down

0 comments on commit e947369

Please sign in to comment.