devise
5047 단어 devise
asatokensei@MacBook-Air tomalog % rake db:migrate:reset
Dropped database 'tomalog_development'
Dropped database 'tomalog_test'
Created database 'tomalog_development'
Created database 'tomalog_test'
== 20200618130702 CreateUsers: migrating ======================================
-- create_table(:users)
-> 0.0134s
== 20200618130702 CreateUsers: migrated (0.0135s) =============================
== 20200619021757 AddPasswordDigestToUsers: migrating =========================
-- add_column(:users, :password_digest, :string)
-> 0.0183s
== 20200619021757 AddPasswordDigestToUsers: migrated (0.0184s) ================
== 20200620002508 AddRememberDigestToUsers: migrating =========================
-- add_column(:users, :remember_digest, :string)
-> 0.0151s
== 20200620002508 AddRememberDigestToUsers: migrated (0.0151s) ================
== 20200620101945 AddAdminToUsers: migrating ==================================
-- add_column(:users, :admin, :boolean)
-> 0.0144s
== 20200620101945 AddAdminToUsers: migrated (0.0145s) =========================
== 20200621004334 CreatePosts: migrating ======================================
-- create_table(:posts)
-> 0.0114s
-- add_index(:posts, [:user_id, :created_at])
-> 0.0146s
== 20200621004334 CreatePosts: migrated (0.0261s) =============================
== 20200621124425 AddImageToPosts: migrating ==================================
-- add_column(:posts, :image, :string)
-> 0.0155s
== 20200621124425 AddImageToPosts: migrated (0.0157s) =========================
== 20200624083831 AddDeviseToUsers: migrating =================================
-- change_table(:users)
rake 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/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:7:in `block in up'
/Users/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:5:in `up'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Duplicate column name 'email': ALTER TABLE `users` ADD `email` varchar(255) DEFAULT '' NOT NULL
/Users/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:7:in `block in up'
/Users/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:5:in `up'
Caused by:
Mysql2::Error: Duplicate column name 'email'
/Users/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:7:in `block in up'
/Users/asatokensei/tomalog/db/migrate/20200624083831_add_devise_to_users.rb:5:in `up'
Tasks: TOP => db:migrate:reset => db:migrate
(See full trace by running task with --trace)
has_secure_password
asatokensei@MacBook-Air tomalog % rake db:migrate:reset
Dropped database 'tomalog_development'
Dropped database 'tomalog_test'
Created database 'tomalog_development'
Created database 'tomalog_test'
== 20200618130702 CreateUsers: migrating ======================================
-- create_table(:users)
-> 0.0141s
== 20200618130702 CreateUsers: migrated (0.0141s) =============================
== 20200619021757 AddPasswordDigestToUsers: migrating =========================
-- add_column(:users, :password_digest, :string)
-> 0.0205s
== 20200619021757 AddPasswordDigestToUsers: migrated (0.0207s) ================
== 20200620002508 AddRememberDigestToUsers: migrating =========================
-- add_column(:users, :remember_digest, :string)
-> 0.0179s
== 20200620002508 AddRememberDigestToUsers: migrated (0.0180s) ================
== 20200620101945 AddAdminToUsers: migrating ==================================
-- add_column(:users, :admin, :boolean)
-> 0.0184s
== 20200620101945 AddAdminToUsers: migrated (0.0185s) =========================
== 20200621004334 CreatePosts: migrating ======================================
-- create_table(:posts)
-> 0.0134s
-- add_index(:posts, [:user_id, :created_at])
-> 0.0156s
== 20200621004334 CreatePosts: migrated (0.0291s) =============================
== 20200621124425 AddImageToPosts: migrating ==================================
-- add_column(:posts, :image, :string)
-> 0.0155s
== 20200621124425 AddImageToPosts: migrated (0.0156s) =========================
== 20200624083831 AddDeviseToUsers: migrating =================================
-- change_table(:users)
-> 0.0761s
-- add_index(:users, :email, {:unique=>true})
-> 0.0127s
-- add_index(:users, :reset_password_token, {:unique=>true})
-> 0.0126s
== 20200624083831 AddDeviseToUsers: migrated (0.1018s) ========================
Reference
이 문제에 관하여(devise), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kenkeeeenbbt/items/4e8aec478f670f1745ec텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)