Revision 0fa5d146
Added by Dominic Cleal over 10 years ago
db/migrate/20090717025820_create_media.rb | ||
---|---|---|
class CreateMedia < ActiveRecord::Migration
|
||
class Medium < ActiveRecord::Base; end
|
||
def self.up
|
||
create_table :media do |t|
|
||
t.string :name, :limit => 50, :default => "", :null => false
|
||
... | ... | |
t.references :operatingsystem
|
||
t.timestamps
|
||
end
|
||
Medium.create :name => "CentOS mirror", :path => "http://mirror.centos.org/centos/$major.$minor/os/$arch"
|
||
Medium.create :name => "Fedora Mirror", :path => "http://mirror.switch.ch/ftp/mirror/fedora/linux/releases/$major/Fedora/$arch/os/"
|
||
Medium.create :name => "Ubuntu Mirror", :path => "http://archive.ubuntu.com/ubuntu/"
|
||
|
||
end
|
||
|
||
def self.down
|
Also available in: Unified diff
fixes #3752 - move data population from migrations into seed script