Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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
Source by stackoverrun.com #
 
PREVIOUS NEXT
Tagged: #table #CREATE #TABLE #integer #PRIMARY #KEY #AUTOINCREMENT #NOT #NULL
ADD COMMENT
Topic
Name
7+6 =