forked from refinery/refinerycms-inquiries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_inquiries.rb
34 lines (31 loc) · 950 Bytes
/
create_inquiries.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class CreateInquiries < ActiveRecord::Migration
def self.up
unless ::Inquiry.table_exists?
create_table ::Inquiry.table_name, :force => true do |t|
t.string "name"
t.string "email"
t.string "phone"
t.text "message"
t.integer "position"
t.boolean "open", :default => true
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "spam", :default => false
end
add_index ::Inquiry.table_name, :id
end
# todo: remove at 1.0
create_table ::InquirySetting.table_name, :force => true do |t|
t.string "name"
t.text "value"
t.boolean "destroyable"
t.datetime "created_at"
t.datetime "updated_at"
end unless ::InquirySetting.table_exists?
end
def self.down
remove_table ::Inquiry.table_name
# todo: remove at 1.0
remove_table ::InquirySetting.table_name
end
end