Add scripts to run migrations and to connect to the db
This commit is contained in:
9
framework/cmd.d/db
Executable file
9
framework/cmd.d/db
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
# FIXME: don't hard code this of course
|
||||
PGPASSWORD=diachron psql -U diachron -h localhost diachron
|
||||
9
framework/cmd.d/migrate
Executable file
9
framework/cmd.d/migrate
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
cd "$ROOT/express"
|
||||
"$DIR"/tsx migrate.ts "$@"
|
||||
Reference in New Issue
Block a user