OSDN Git Service

add Picture
[pettanr/pettanr.git] / db / migrate / 20120703094658_create_pictures.rb
1 class CreatePictures < ActiveRecord::Migration
2   def change
3     create_table :pictures do |t|
4       t.integer :original_picture_id, :null => false, :default => 0
5       t.integer :revision, :null => false, :default => 1
6       t.string :ext, :null => false
7       t.integer :width, :null => false
8       t.integer :height, :null => false
9       t.integer :filesize, :null => false
10       t.integer :artist_id, :null => false, :default => 0
11       t.integer :license_id, :null => false, :default => 0
12       t.string :artist_name, :null => false, :default => 'unknown'
13       t.string :credit
14       t.string :settings
15
16       t.timestamps
17     end
18   end
19 end