OSDN Git Service

import all source code
[pettanr/pettanr.git] / db / migrate / 20111206112042_create_original_pictures.rb
diff --git a/db/migrate/20111206112042_create_original_pictures.rb b/db/migrate/20111206112042_create_original_pictures.rb
new file mode 100644 (file)
index 0000000..b1bf18f
--- /dev/null
@@ -0,0 +1,15 @@
+class CreateOriginalPictures < ActiveRecord::Migration
+  def change
+    create_table :original_pictures do |t|
+      t.string :ext, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+      t.integer :filesize, :null => false
+      t.integer :artist_id#, :null => false
+      t.integer :lisence_id#, :null => false
+
+      t.timestamps
+    end
+    add_index :original_pictures, [:artist_id]\r
+  end
+end