Updated database code to see if it aligns with workflow requirements
Some checks failed
Compile / Compile (push) Failing after 22s
Some checks failed
Compile / Compile (push) Failing after 22s
This commit is contained in:
@@ -19,7 +19,11 @@ require 'pg'
|
||||
class Database
|
||||
def initialize
|
||||
# Connect once when the bot starts
|
||||
@conn = PG.connect(dbname: 'fgbot_db')
|
||||
@conn = PG.connect(
|
||||
host: ENV['DB_HOST'] || 'localhost',
|
||||
dbname: ENV['DB_NAME'] || 'fgbot_db'
|
||||
user: ENV['DB_USER'] || 'postgres'
|
||||
)
|
||||
|
||||
init_tables
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user