updated and moved ignore file
[selectricity] / db / migrate / 001_move_to_attachment_fu.rb
1 class MoveToAttachmentFu < ActiveRecord::Migration
2   def self.up
3     drop_table :pictures
4
5     # create attachment_fu metadata table
6     create_table :pictures do |t|
7       t.column :filename,     :string
8       t.column :content_type, :string
9       t.column :size,         :integer
10       t.column :width,        :integer
11       t.column :height,       :integer
12       t.column :parent_id,    :integer
13       t.column :thumbnail,    :string
14       t.column :created_at,   :datetime
15       t.column "candidate_id", :integer
16     end    
17   end
18
19   def self.down
20     drop_table :pictures
21
22     create_table "pictures", :force => true do |t|
23       t.column "filename",     :string,  :limit => 200
24       t.column "data",         :binary
25       t.column "filetype",     :string,  :limit => 100
26       t.column "candidate_id", :integer
27     end
28   end
29 end

Benjamin Mako Hill || Want to submit a patch?