Updated database code to see if it aligns with workflow requirements
Some checks failed
Compile / Compile (push) Failing after 22s

This commit is contained in:
2026-01-06 18:12:55 -03:00
parent 77d992720d
commit 1253471fc3

View File

@@ -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