mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 11:17:50 +01:00
11 lines
490 B
Plaintext
11 lines
490 B
Plaintext
|
#!/bin/sh
|
||
|
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||
|
|
||
|
CYCLOTRON_DATABASE_NAME=${CYCLOTRON_DATABASE_NAME:-cyclotron}
|
||
|
CYCLOTRON_DATABASE_URL=${CYCLOTRON_DATABASE_URL:-postgres://posthog:posthog@localhost:5432/$CYCLOTRON_DATABASE_NAME}
|
||
|
|
||
|
echo "Performing cyclotron migrations for $CYCLOTRON_DATABASE_URL (DATABASE_NAME=$CYCLOTRON_DATABASE_NAME)"
|
||
|
|
||
|
sqlx database create -D "$CYCLOTRON_DATABASE_URL"
|
||
|
sqlx migrate run -D "$CYCLOTRON_DATABASE_URL" --source $SCRIPT_DIR/../cyclotron-core/migrations
|