mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
feat(db): auto-migrate both DBs on serve via scripts/migrate.sh
This commit is contained in:
15
justfile
15
justfile
@@ -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