Revision 8df3ee44
Added by Ohad Levy about 12 years ago
- ID 8df3ee445c3b1bf01ca1d5d446de2d1fd8600597
db/migrate/20090714132448_create_hosts.rb | ||
---|---|---|
# we are only creating the full database if the hosts table doesn't exists, if it does, we assume that store config is already configured
|
||
unless Host.table_exists?
|
||
require 'puppet/rails/database/schema'
|
||
Puppet[:dbadapter]= ActiveRecord::Base.configurations[Rails.root]["adapter"]
|
||
Puppet[:dbadapter]= ActiveRecord::Base.configurations[RAILS_ENV]["adapter"]
|
||
Puppet::Rails::Schema.init
|
||
Puppet::Rails.migrate()
|
||
end
|
Also available in: Unified diff
fixes wrong code smell