rake db:migrateしようとすると以下のエラーがでます。アップデート、リセットしても同じエラーがでます。改善策をしっているかた教えてください。
$ rake db:migrate
== 20160917001950 AddIndexToUsersEmail: migrating =============================
-- add_index(:users, :email, {:unique=>true})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such table: main.users: CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
/memo_app/db/migrate/20160917001950_add_index_to_users_email.rb:3:in change' ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: main.users: CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email") /Users/kosuke.kato/tutu/memo_app/db/migrate/20160917001950_add_index_to_users_email.rb:3:in
change'
SQLite3::SQLException: no such table: main.users
memo_app/db/migrate/20160917001950_add_index_to_users_email.rb:3:in `change'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/01 09:35