This commit is contained in:
Captain Future
2011-04-17 16:26:36 +02:00
commit e6134722d4
39 changed files with 1199 additions and 0 deletions
@@ -0,0 +1,30 @@
class CreateDigitals < ActiveRecord::Migration
def self.up
create_table :digitals do |t|
t.integer :variant_id
t.string :attachment_file_name
t.string :attachment_content_type
t.integer :attachment_file_size
t.timestamps
end
add_index :digitals, :variant_id
create_table :digital_links, :force => true do |t|
t.integer :digital_id
t.integer :line_item_id
t.string :secret
t.integer :access_counter
t.timestamps
end
add_index :digital_links, :digital_id
add_index :digital_links, :line_item_id
add_index :digital_links, :secret
end
def self.down
drop_table :digitals
drop_table :digital_links
end
end