diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-11-20 19:19:32 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-11-20 19:19:57 +0100 |
commit | e87cc59811fab285033cc78d97ad7f0b8df9c081 (patch) | |
tree | 6b8944b2bf8e13ba76627a0e38886dfb3b35c566 /config/initializers | |
parent | 6b999411fc30c1eee7c006ea7294791a7824c162 (diff) |
Fix weird edge case in load_schema
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/0_duplicate_migrations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/0_duplicate_migrations.rb b/config/initializers/0_duplicate_migrations.rb index 509a069e6..4ab806587 100644 --- a/config/initializers/0_duplicate_migrations.rb +++ b/config/initializers/0_duplicate_migrations.rb @@ -24,7 +24,7 @@ module ActiveRecord # We have a set of allowed duplicates. Keep the migrated one, if any. non_migrated = duplicates.reject { |m| migrated.include?(m.version.to_i) } - if duplicates.length == non_migrated.length + if duplicates.length == non_migrated.length || non_migrated.length == 0 # There weren't any migrated one, so we have to pick one “canonical” migration migrations = migrations - duplicates[1..-1] else |