Archive: ComponentOwl Rails app, DB backups, go redirect script
This commit is contained in:
22
db/migrate/20100818082747_create_pad_values.rb
Normal file
22
db/migrate/20100818082747_create_pad_values.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
class CreatePadValues < ActiveRecord::Migration
|
||||
include PadImport
|
||||
|
||||
def self.up
|
||||
create_table :pad_values do |t|
|
||||
t.integer :product_id, :references => :products
|
||||
t.string :key
|
||||
t.text :value
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
puts "Migrating existing PAD files to database..."
|
||||
Product.all.each do |product|
|
||||
import_pad(product) if product.setup_file.file?
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :pad_values
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user