From 9242bac2d54ebef462b70bcd063e330d70fd1d3d Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 27 Oct 2025 09:38:50 -0400 Subject: [PATCH] Make migration audit more robust ref: https://fizzy.37signals.com/5986089/cards/2542 --- bin/migration-audit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/migration-audit b/bin/migration-audit index 20a96ca7c..3f92c1f61 100755 --- a/bin/migration-audit +++ b/bin/migration-audit @@ -45,11 +45,11 @@ gum style --foreground 135 --bold "Migration or schema files changed:" gum style --foreground 240 "$changed_files" echo -step "Deleting schema files" rm -f db/schema.rb db/schema_cache.yml +step "Deleting schema files" rm -f db/untenanted_schema.rb db/schema.rb db/schema_cache.yml step "Deleting tenant directory" rm -rf storage/tenants/development/686465299 -step --spin "Migrating..." "Regenerating schema files" bin/rails db:migrate +step --spin "Migrating..." "Regenerating schema files" bin/rails db:migrate ARTENANT=686465299 # Check if the schema files have any git changes if git diff --quiet -- db/schema.rb db/schema_cache.yml; then