added database migration system, reference package.json for commands

This commit is contained in:
2025-10-28 21:31:14 -04:00
parent 6b29501d59
commit 33eca18e82
5 changed files with 648 additions and 5 deletions

View File

@@ -9,7 +9,12 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsc && cross-env NODE_ENV=development node ./built/api/src/index.js",
"prod": "tsc && node ./built/api/src/index.js"
"prod": "tsc && node ./built/api/src/index.js",
"migrate": "node ./scripts/migrate.js",
"migrate:create": "npm run migrate -- create -ext sql -dir /migrations",
"migrate:up": "npm run migrate -- up",
"migrate:down": "npm run migrate -- down 1"
},
"dependencies": {
"connect-sqlite3": "^0.9.16",
@@ -29,8 +34,5 @@
"@types/node": "^24.8.1",
"cross-env": "^10.1.0",
"typescript": "^5.9.3"
},
"dotenv": {
"auto": false
}
}