Updated whois tasks and added whois_json

This commit is contained in:
Priit Tark 2015-04-22 11:51:33 +03:00
parent 3d0d98d9b1
commit 8dae9d9deb
4 changed files with 44 additions and 29 deletions

View file

@ -33,7 +33,7 @@ namespace :db do
task create: [:environment, :load_config] do
databases.each do |name|
begin
puts "\n---------------------------- Create #{name} ----------------------------------------\n"
puts "\n------------------------ Create #{name} ---------------------------------------\n"
ActiveRecord::Base.clear_all_connections!
conf = ActiveRecord::Base.configurations
@ -75,7 +75,7 @@ namespace :db do
task load: [:environment, :load_config] do
databases.each do |name|
begin
puts "\n---------------------------- #{name} schema loaded ----------------------------------------\n"
puts "\n------------------------ #{name} schema loading -----------------------------\n"
ActiveRecord::Base.clear_all_connections!
ActiveRecord::Base.establish_connection(name.to_sym)
if ActiveRecord::Base.connection.table_exists?('schema_migrations')