Module: UseDb::Migrator::ClassMethods

Defined in:
lib/use_db/migration.rb

Instance Method Summary collapse

Instance Method Details

#get_all_versions_with_connection_swapObject



56
57
58
59
60
61
62
63
# File 'lib/use_db/migration.rb', line 56

def get_all_versions_with_connection_swap
#			puts "in use_db get_all_versions"
#			Base.connection.select_values("SELECT version FROM #{schema_migrations_table_name}").map(&:to_i).sort
	UseDbPlugin.all_use_dbs.collect(&:connection).collect{|c|
		c.initialize_schema_migrations_table	# in case it doesn't exist
		c.select_values("SELECT version FROM #{schema_migrations_table_name}").map(&:to_i)
	}.flatten.uniq.sort
end