[Solved] "Multiple migrations have the name CreateCustomFilters." error during upgrade to v2.5.0


#1

Edit: removing “20180628181026_create_custom_filters.rb” in /live/db/migrate directory cleared the issue.

Hi,

I am trying to execute this step: SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate

But I get the following errors and I couldn’t find much information on how to fix it, can someone kindly guide me?

mastodon@host:~/live$ SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
rails aborted!
ActiveRecord::DuplicateMigrationNameError:

Multiple migrations have the name CreateCustomFilters.

/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1316:in validate'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1185:in initialize'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1036:in new'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1036:in up'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1011:in migrate'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/tasks/database_tasks.rb:172:in migrate'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/strong_migrations-0.2.2/lib/strong_migrations/database_tasks.rb:4:in migrate'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:60:in block (2 levels) in <top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:23:in block in perform'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:20:in perform'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:48:in invoke'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in <top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in block in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
mastodon@host:~/live$

#2

Okay, removing “20180628181026_create_custom_filters.rb” in /live/db/migrate directory cleared the issue.


#3

what does git status and git show --oneline output?


#4

Hi @nightpool, here’s the status for git status:

mastodon@host:~/live$ git status
On branch v2.6.1
Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

    modified:   .ruby-version
    modified:   app/javascript/images/elephant-fren.png
    modified:   app/javascript/images/elephant_ui_greeting.svg
    modified:   app/javascript/images/elephant_ui_plane.svg
    modified:   app/javascript/images/logo.svg
    modified:   config/themes.yml
    deleted:    db/migrate/20180628181026_create_custom_filters.rb
    modified:   public/android-chrome-192x192.png
    modified:   public/apple-touch-icon.png
    modified:   public/favicon.ico

Untracked files:
(use “git add …” to include in what will be committed)

    app/javascript/styles/custom.scss
    db/migrate/20180528141302_create_custom_filters.rb
    dump8thNov.sql

no changes added to commit (use “git add” and/or “git commit -a”)
mastodon@host:~/live$

And for git show --oneline:

mastodon@host:~/live$ git show --oneline
ba06a5f Bump version to 2.6.1 (#9172)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a75026…cb8bf32 100644
— a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,12 @@ Changelog

All notable changes to this project will be documented in this file.

+## [2.6.1] - 2018-10-30
+### Fixed
+
± Fix resolving resources by URL not working due to a regression in #9132 (#9171)
± Fix reducer error in web UI when a conversation has no last status (#9173)
+

[2.6.0] - 2018-10-30

Added

diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 7cc8373…2e39ad0 100644
— a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -13,7 +13,7 @@ module Mastodon
end

 def patch
  •  0
    
  •  1
    

    end

    def pre