Class: CreateInquiries

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/create_inquiries.rb

Instance Method Summary collapse

Instance Method Details

#downObject



14
15
16
# File 'lib/generators/templates/create_inquiries.rb', line 14

def down
   drop_table :inquiries
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/templates/create_inquiries.rb', line 2

def up
  unless Inquiries::Inquiry.table_exists?
    create_table :inquiries, :force => true do |t|
      t.string   :name
      t.string   :email
      t.text     :message
      t.boolean  :spam,     :default => false
      t.timestamps
    end
  end
end