Merge pull request #1374 from basecamp/fix-migrate-primary-db-again-v2

Exit with status 0 if not the primary
This commit is contained in:
Stanko Krtalić
2025-10-23 14:13:23 +02:00
committed by GitHub
+6 -1
View File
@@ -1,3 +1,8 @@
#!/usr/bin/env bash
bundle exec beamer is-primary --directory ./storage && bin/rails db:prepare
if bundle exec beamer is-primary --directory ./storage; then
echo "Running on primary node, preparing the database..."
bin/rails db:prepare
else
echo "This is not a primary node, skipping database preparation."
fi