OSDN Git Service

e05cbbfc3cc0994ccc42f013aed0da7d2132bd06
[pettanr/pettanr.git] / db / migrate / 20111206113803_create_panel_pictures.rb
1 class CreatePanelPictures < ActiveRecord::Migration
2   def change
3     create_table :panel_pictures do |t|
4       t.integer :panel_id, :null => false
5       t.integer :resource_picture_id, :null => false
6       t.string :link, :limit => 200
7       t.integer :x, :null => false
8       t.integer :y, :null => false
9       t.integer :z, :null => false
10       t.integer :t, :null => false, :default => 1
11       t.integer :width, :null => false
12       t.integer :height, :null => false
13
14       t.timestamps
15     end
16     add_index :panel_pictures, [:panel_id, :t], :unique => true, :name => 'panel_pictures_idt'
17   end
18 end