You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
430 B
18 lines
430 B
12 years ago
|
class CreateSettings < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
create_table :settings do |t|
|
||
|
t.string :var, :null => false
|
||
|
t.text :value, :null => true
|
||
|
t.integer :thing_id, :null => true
|
||
|
t.string :thing_type, :limit => 30, :null => true
|
||
|
t.timestamps
|
||
|
end
|
||
|
|
||
|
add_index :settings, [ :thing_type, :thing_id, :var ], :unique => true
|
||
|
end
|
||
|
|
||
|
def self.down
|
||
|
drop_table :settings
|
||
|
end
|
||
|
end
|