Revision 0fa5d146
Added by Dominic Cleal over 10 years ago
db/migrate/20131122150434_add_pxegrub_localboot_template.rb | ||
---|---|---|
class AddPxegrubLocalbootTemplate < ActiveRecord::Migration
|
||
class ConfigTemplate < ActiveRecord::Base
|
||
has_and_belongs_to_many :operatingsystems
|
||
end
|
||
def self.up
|
||
ConfigTemplate.create(
|
||
:name => "PXEGrub Localboot Default",
|
||
:template_kind_id => TemplateKind.find_by_name("PXEGrub").id,
|
||
:operatingsystem_ids => [],
|
||
:template => File.read("#{Rails.root}/app/views/unattended/pxegrub_local.erb"))
|
||
end
|
||
|
||
def self.down
|
Also available in: Unified diff
fixes #3752 - move data population from migrations into seed script