マイグレーションファイルを変更したく、一度すべてやり直したいのですがうまくいきません。
何をする必要があるのでしょうか。
$ docker-compose run --rm api bin/rails db:rollback Starting home_care_navi_db_1 ... done rails aborted! ActiveRecord::UnknownMigrationVersionError: No migration with version number 20200813061344. /usr/local/bundle/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1169:in `move' /usr/local/bundle/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1047:in `rollback' /usr/local/bundle/gems/activerecord-6.0.3.1/lib/active_record/railties/databases.rake:225:in `block (2 levels) in <main>' /usr/local/bundle/gems/railties-6.0.3.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform' /usr/local/bundle/gems/railties-6.0.3.1/lib/rails/commands/rake/rake_command.rb:20:in `perform' /usr/local/bundle/gems/railties-6.0.3.1/lib/rails/command.rb:48:in `invoke' /usr/local/bundle/gems/railties-6.0.3.1/lib/rails/commands.rb:18:in `<main>' /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /usr/local/bundle/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `block in require' /usr/local/bundle/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in `load_dependency' /usr/local/bundle/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `require' bin/rails:4:in `<main>' Tasks: TOP => db:rollback (See full trace by running task with --trace)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。