31 lines
927 B
Plaintext
31 lines
927 B
Plaintext
project_root := justfile_directory()
|
|
backend_dir := project_root + "/Backend"
|
|
|
|
# Apply embedded database migrations.
|
|
migrate-up:
|
|
cd '{{backend_dir}}' && go run ./cmd/migrate up
|
|
|
|
# Roll back the most recent embedded database migration.
|
|
migrate-down:
|
|
cd '{{backend_dir}}' && go run ./cmd/migrate down
|
|
|
|
# Reset all embedded database migrations.
|
|
migrate-reset:
|
|
cd '{{backend_dir}}' && go run ./cmd/migrate reset
|
|
|
|
# Reset embedded database migrations and apply them again from scratch.
|
|
migrate-rebuild:
|
|
cd '{{backend_dir}}' && go run ./cmd/migrate reset && go run ./cmd/migrate up
|
|
|
|
# Show the embedded database migration status.
|
|
migrate-status:
|
|
cd '{{backend_dir}}' && go run ./cmd/migrate status
|
|
|
|
# Rebuild the POSIX-to-DB projection from the current POSIX root.
|
|
posix-rebuild:
|
|
cd '{{backend_dir}}' && go run ./cmd/posix rebuild
|
|
|
|
# Format backend Go source files.
|
|
fmt:
|
|
cd '{{backend_dir}}' && gofmt -w ./cmd ./db ./internal
|