Revision dbdc8726
Added by Trey Dockendorf over 11 years ago
- ID dbdc87269f48345a582a793b1714e1439b2fed29
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_ENV]["adapter"]
|
||
Puppet[:dbadapter]= ActiveRecord::Base.configurations[RAILS_ENV]["adapter"].sub("mysql2", "mysql")
|
||
Puppet::Rails::Schema.init
|
||
Puppet::Rails.migrate()
|
||
end
|
Also available in: Unified diff
- Allows mysql2 usage with Puppet < 2.7.10 - Fixes #1350