mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
feat(db): auto-migrate both DBs on serve via scripts/migrate.sh
This commit is contained in:
1 parent
af06e09caa
commit
72d48c49c3
5 files changed
+139
-1
No files matched your search
@@ -12,7 +12,7 @@ setup:
|
||||
@bash scripts/setup-dev.sh
|
||||
|
||||
[group('dev')]
|
||||
serve:
|
||||
serve: migrate
|
||||
@php -S 127.0.0.1:8000 -t public/
|
||||
|
||||
[group('dev')]
|
||||
@@ -110,6 +110,19 @@ syntax:
|
||||
# Database
|
||||
# ============================================================================
|
||||
|
||||
[group('database')]
|
||||
migrate:
|
||||
@echo "Running migrations…"
|
||||
@bash scripts/migrate.sh both
|
||||
|
||||
[group('database')]
|
||||
migrate-test:
|
||||
@bash scripts/migrate.sh test
|
||||
|
||||
[group('database')]
|
||||
migrate-prod:
|
||||
@bash scripts/migrate.sh prod
|
||||
|
||||
[group('database')]
|
||||
init-db:
|
||||
@sqlite3 storage/test.db < storage/schema.sql
|
||||
|
||||
Reference in new issue
Block a user