Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial migration #134

Merged
merged 3 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
dist
# don't lint nyc coverage output
coverage
src/migration/
15 changes: 15 additions & 0 deletions ormconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
"type": "postgres",
"host": process.env.DATABASE_HOSTNAME || "host.docker.internal",
"port": parseInt(process.env.DATABASE_PORT, 10) || 5433,
"username": process.env.DATABASE_USERNAME || "os2iot",
"password": process.env.DATABASE_PASSWORD || "toi2so",
"database": "os2iot",
"synchronize": false,
"logging": false,
"entities": ["src/entities/*.ts"],
"migrations": ["src/migration/*.ts"],
"cli": {
"migrationsDir": "src/migration"
}
}
15 changes: 0 additions & 15 deletions ormconfig.ts

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "nest build",
"generate-migration": "npm run typeorm migration:generate -- -n",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prestart": "npm run runMigrations",
"prestart": "npm run run-migrations",
"prestart:debug": "npm run run-migrations",
"prestart:dev": "npm run run-migrations",
"prestart:prod": "npm run run-migrations",
Expand All @@ -25,7 +25,7 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./jest-e2e.js --detectOpenHandles --colors",
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ./ormconfig.ts",
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ./ormconfig.js",
"typeorm-e2e": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ./ormconfig-e2e.json"
},
"dependencies": {
Expand Down
Loading