You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rails 7.1 added the feature to record validate in schema.rb, see upstream PR: rails/rails#46339
My proposal is that active_record_doctor emits an error when validate: false exists. In my experience, this is normally a "code smell" that something went wrong with migrations and they are incomplete.
These will be false positives most of the time, because the next step in migrations will be validation for these and the validate will be removed then. So it will stay not a long time in the schema.rb and lead to violations and disabling of it in the gems config file.
These will be false positives most of the time, because the next step in migrations will be validation for these and the validate will be removed then. So it will stay not a long time in the schema.rb and lead to violations and disabling of it in the gems config file.
In my experience, these steps come together within the same PR, just as separate migration files. So at CI time, there will not be a false positive.
Rails 7.1 added the feature to record
validate
inschema.rb
, see upstream PR: rails/rails#46339My proposal is that active_record_doctor emits an error when
validate: false
exists. In my experience, this is normally a "code smell" that something went wrong with migrations and they are incomplete.I most often use
validate: false
on the advice of strong_migrations for a zero downtime schema change, but the validation is resolved once all migration riles run. Their docs are at: https://github.com/ankane/strong_migrations#adding-a-foreign-keyThe text was updated successfully, but these errors were encountered: