Error :: StandardError: An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "users" already exists
Error ::
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "users" already exists
................................................................................................................................................
just run into the console
rails console
and type in
ActiveRecord::Migration.drop_table(:users)
and then exit the console and
rake db:migrate
This method is successful ::
this will work definately
If you create an empty migration by running:
rails g migration DropInstalls
or:
rails generate migration DropInstalls
You can then add this into that empty migration:
class DropInstalls < ActiveRecord::Migration
def change
drop_table :installs
end
end
Then run rake db:migrate in the command line which should remove the Installs table
Note: db/schema.rb is an autogenerated file. To alter the db structure, you should use the migrations instead of attempting to edit the schema file.
Comments
Post a Comment