From 0d18a00bb66eeb239772ea0c75894aab4cb4b50a Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Thu, 23 Oct 2025 14:12:01 +0200 Subject: [PATCH] Exit with status 0 if not the primary --- bin/migrate-primary-db | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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