Sha256: bc96d5691825031ea1e1e9f82957624222a91d436aab42dcd29164fe7651d5fa
Contents?: true
Size: 1.15 KB
Versions: 5
Compression:
Stored size: 1.15 KB
Contents
class CreatePtables < ActiveRecord::Migration class Ptable < ActiveRecord::Base; end def self.up create_table :ptables do |t| t.string :name, :limit => 64, :null => false t.string :layout, :limit => 4096, :null => false t.references :operatingsystem t.timestamps end Ptable.create :name => "RedHat default", :layout =>"zerombr yes\nclearpart --all --initlabel\npart /boot --fstype ext3 --size=100 --asprimary\npart / --fstype ext3 --size=1024 --grow\npart swap --recommended" Ptable.create :name => "Ubuntu default", :layout =>"d-i partman-auto/disk string /dev/sda\nd-i partman-auto/method string regular\nd-i partman-auto/init_automatically_partition select Guided - use entire disk\nd-i partman/confirm_write_new_label boolean true\nd-i partman/choose_partition select \\\nFinish partitioning and write changes to disk\nd-i partman/confirm boolean true\n" create_table :operatingsystems_ptables, :id => false do |t| t.references :ptable, :null => false t.references :operatingsystem, :null => false end end def self.down drop_table :ptables drop_table :operatingsystems_ptables end end
Version data entries
5 entries across 5 versions & 1 rubygems