diff options
| author | soryu <soryu@soryu.co> | 2025-12-23 02:14:58 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2025-12-23 14:47:18 +0000 |
| commit | a32dc56d2e5447ef8988cb98b8686476cc94e70c (patch) | |
| tree | 61307503c4af82103cea2360fe95d3ea324968d6 /makima/sh/run-migrations.sh | |
| parent | 73649d135efccda7e446775db773e21b458de202 (diff) | |
| download | soryu-a32dc56d2e5447ef8988cb98b8686476cc94e70c.tar.gz soryu-a32dc56d2e5447ef8988cb98b8686476cc94e70c.zip | |
Add Postgres for persistence and File cabinet
Migrations are local only currently, and must be run manually by setting POSTGRES_CONNECTION_URI
Diffstat (limited to 'makima/sh/run-migrations.sh')
| -rwxr-xr-x | makima/sh/run-migrations.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/makima/sh/run-migrations.sh b/makima/sh/run-migrations.sh new file mode 100755 index 0000000..d34d6b1 --- /dev/null +++ b/makima/sh/run-migrations.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Run sqlx migrations + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +MAKIMA_DIR="$(dirname "${SCRIPT_DIR}")" + +POSTGRES_CONNECTION_URI="${POSTGRES_CONNECTION_URI:-postgres://makima:makima_dev@localhost:5432/makima}" + +echo "Running migrations from ${MAKIMA_DIR}/migrations..." +sqlx migrate run --source "${MAKIMA_DIR}/migrations" --database-url "${POSTGRES_CONNECTION_URI}" +echo "Migrations complete!" |
