class CreateContests < ActiveRecord::Migration def change drop_table :contests drop_table :contest_notifications drop_table :contesting_projects drop_table :contesting_softapplications drop_table :contestnotifications create_table :contests do |t| t.integer :user_id t.string :name t.text :description t.boolean :is_public t.boolean :is_delete, :default => false t.integer :visits, :default => 0 t.string :invite_code t.integer :invite_code_halt, :default => 0 t.timestamps end for i in 1 .. 779 Contest.create(:user_id => 2, :name => 'test', :is_public => false, :is_delete => true) end end end