Module: DatabaseUpdate

Defined in:
lib/dbupdate/dbupdate.rb

Class Method Summary collapse

Class Method Details

.DBUpdateObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/dbupdate/dbupdate.rb', line 7

def self.DBUpdate
  version = ActiveRecord::Migrator.current_version rescue 0
  version > 0 ? "\n# Schema version: #{version}" : ''

	puts version
	
	adapter  = config.database_configuration[production]["adapter"]
	database = config.database_configuration[production]["database"]
	host     = config.database_configuration[production]["host"]
	port     = config.database_configuration[production]["port"]
	username = config.database_configuration[production]["username"]
	password = config.database_configuration[production]["password"]
	
	puts username + ' ' + password
	
	
end