This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/db/migrate/012_create_tag_images.rb

21 lines
529 B
Ruby

class CreateTagImages < ActiveRecord::Migration
def self.up
create_table :tag_images do |t|
t.column :image_id, :integer
t.column :tagged_id, :integer
t.column :tagged_type, :string, :limit => 32
t.column :primary, :boolean
t.column :x, :integer
t.column :y, :integer
end
add_index :tag_images, :image_id
add_index :tag_images, :tagged_id
add_index :tag_images, :tagged_type
add_index :tag_images, :primary
end
def self.down
drop_table :tag_images
end
end