lib/perus/server/db.rb in perus-0.1.32 vs lib/perus/server/db.rb in perus-0.1.33
- old
+ new
@@ -15,10 +15,10 @@
puts 'Loading database'
Sequel.extension :migration
Sequel.extension :inflector
# connect/create the database and run any new migrations
- @db = Sequel.postgres('perus', host: (Server.options.db['host'] || ENV['POSTGRES_HOST'] || 'localhost'), username: Server.options.db['username'], password: Server.options.db['password'])
+ @db = Sequel.postgres((Server.options.db['db'] || 'perus'), host: (Server.options.db['host'] || ENV['POSTGRES_HOST'] || 'localhost'), username: Server.options.db['username'], password: Server.options.db['password'])
Sequel::Migrator.run(@db, File.join(__dir__, 'migrations'))
# load models - these rely on an existing db connection
Dir.chdir(File.join(__dir__, 'models')) do
require './system'