Sha256: e4e413761ca9f91d583021f19e91f934d950ee38f8a20bb5f30813baf47f7528
Contents?: true
Size: 540 Bytes
Versions: 19
Compression:
Stored size: 540 Bytes
Contents
# :stopdoc: namespace :db do namespace :gis do desc "Setup PostGIS data in the database" task :setup => [:load_config] do environments_ = [::Rails.env] environments_ << 'test' if ::Rails.env.development? configs_ = ::ActiveRecord::Base.configurations.values_at(*environments_).compact.reject{ |config_| config_['database'].blank? } configs_.each do |config_| ::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks.new(config_).setup_gis end end end end # :startdoc:
Version data entries
19 entries across 19 versions & 2 rubygems