diff --git a/bin/migrate-primary-db b/bin/migrate-primary-db index 8f3e50274..18107a121 100755 --- a/bin/migrate-primary-db +++ b/bin/migrate-primary-db @@ -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