# rails db:migrate を実行すると下記のエラーが出るのですが
意味が理解できなくて困っています。
== 20200726033117 AddDeviseToUsers: migrating =================================
-- change_table(:users)
rails aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Duplicate column name 'email': ALTER TABLE users
ADD email
varchar(255) DEFAULT '' NOT NULL
/Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:7:in block in up' /Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:5:in
up'
/Users//projects/furima_app/bin/rails:9:in <top (required)>' /Users//projects/furima_app/bin/spring:15:in
<top (required)>'
bin/rails:3:in load' bin/rails:3:in
<main>'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Duplicate column name 'email': ALTER TABLE users
ADD email
varchar(255) DEFAULT '' NOT NULL
/Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:7:in block in up' /Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:5:in
up'
/Users//projects/furima_app/bin/rails:9:in <top (required)>' /Users//projects/furima_app/bin/spring:15:in
<top (required)>'
bin/rails:3:in load' bin/rails:3:in
<main>'
Caused by:
Mysql2::Error: Duplicate column name 'email'
/Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:7:in block in up' /Users//projects/furima_app/db/migrate/20200726033117_add_devise_to_users.rb:5:in
up'
/Users//projects/furima_app/bin/rails:9:in <top (required)>' /Users//projects/furima_app/bin/spring:15:in
<top (required)>'
bin/rails:3:in load' bin/rails:3:in
<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/26 04:41
2020/07/26 04:43
2020/07/26 04:52
2020/07/26 05:01
2020/07/26 05:47
2020/07/26 06:30
2020/07/26 11:46
2020/07/26 22:24
2020/07/27 08:55