Add setup-fresh-db script to reset dev database and run migrations.

This commit is contained in:
2026-11-01 22:59:28 +01:00
parent fb482a1052
commit a82fc6d6c0
5 changed files with 67 additions and 0 deletions
+2
View File
@@ -13,6 +13,8 @@
"typeorm:generate-migration": "npm run typeorm -- -d ./src/database/DataSource.ts migration:generate ./src/database/migrations/$npm_config_name",
"typeorm:revert-migration": "npm run typeorm -- -d ./src/database/DataSource.ts migration:revert",
"typeorm:create-migration": "npm run typeorm -- migration:create ./src/database/migrations/$npm_config_name",
"truncate-db": "ts-node -r tsconfig-paths/register ./src/database/utils/drop",
"setup-fresh-db": "npm run truncate-db && npm run typeorm:run-migrations",
"test": "jest"
},
"jest": {