From 6083cf57aa5bee1a2f35bb8d3bb60c49594b0a0c Mon Sep 17 00:00:00 2001 From: Saverio Trioni <476895+rewritten@users.noreply.github.com> Date: Thu, 26 Mar 2026 13:26:19 +0100 Subject: [PATCH 1/2] fix: skip seeds when running in production environment (fixes #828) Co-Authored-By: Claude Sonnet 4.6 --- db/seeds.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/db/seeds.rb b/db/seeds.rb index f0aece73..b9380f12 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,8 @@ +if Rails.env.production? + puts "Skipping seeds in production environment." + return +end + Organization.find_or_create_by(name: "Banco de Tiempo Local") Organization.find_or_create_by(name: "El otro Banco de Tiempo :)") From fae8de01ad1ce022448d4b096bb5d395db6e7fc2 Mon Sep 17 00:00:00 2001 From: Saverio Trioni <476895+rewritten@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:04:39 +0100 Subject: [PATCH 2/2] Update db/seeds.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- db/seeds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index b9380f12..cb08a80f 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,5 +1,5 @@ -if Rails.env.production? - puts "Skipping seeds in production environment." +if Rails.env.production? && ENV["SEED_DEMO_DATA"] != "true" + puts "Skipping seeds in production environment. Set SEED_DEMO_DATA=true to allow demo seeds." return end