Answers for "SQLite3::SQLException: table already exists:"

SQL
0

SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL

class DropCategoriesTable < ActiveRecord::Migration
     def up
       drop_table :categories
     end

     def down
       raise ActiveRecord::IrreversibleMigration
     end
end
Posted by: Guest on November-15-2020
0

SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL

rake db:drop
rake db:create
rake db:migrate
Posted by: Guest on November-15-2020

Code answers related to "SQLite3::SQLException: table already exists:"

Code answers related to "SQL"

Browse Popular Code Answers by Language