16 lines
292 B
Ruby
16 lines
292 B
Ruby
![]() |
class CreateFavorites < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
create_table :favorites do |t|
|
||
|
t.integer :user_id, :limit => 8
|
||
|
t.integer :context_id, :limit => 8
|
||
|
t.string :context_type
|
||
|
|
||
|
t.timestamps
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def self.down
|
||
|
drop_table :favorites
|
||
|
end
|
||
|
end
|