diff --git a/db/config.php b/db/config.php index 3b67cac..3681942 100644 --- a/db/config.php +++ b/db/config.php @@ -8,9 +8,9 @@ function db(): ?PDO { $host = getenv('DB_HOST') ?: '127.0.0.1'; $port = getenv('DB_PORT') ?: '3306'; - $db = getenv('DB_DATABASE') ?: 'flatlogic'; - $user = getenv('DB_USERNAME') ?: 'flatlogic'; - $pass = getenv('DB_PASSWORD') ?: 'flatlogic'; + $db = getenv('DB_NAME') ?: 'app_35256'; + $user = getenv('DB_USER') ?: 'app_35256'; + $pass = getenv('DB_PASS') ?: '0297656a-e7ff-4e19-adc5-34bd6e744b8f'; $charset = 'utf8mb4'; $dsn = "mysql:host=$host;port=$port;dbname=$db;charset=$charset"; diff --git a/db/migrations/001_create_initial_tables.sql b/db/migrations/001_create_initial_tables.sql index 07b1e3d..95de422 100644 --- a/db/migrations/001_create_initial_tables.sql +++ b/db/migrations/001_create_initial_tables.sql @@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS categories ( name VARCHAR(255) NOT NULL UNIQUE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -INSERT IGNORE INTO categories (name) VALUES ('Food'), ('Pharmacy'), ('Transport'), ('Shopping'); +INSERT IGNORE INTO categories (name) VALUES ('Food'), ('Pharmacy'), ('Transport'), ('Shopping'), ('Sports'), ('Entertainment'), ('Groceries'), ('House hold Items'), ('Education'); CREATE TABLE IF NOT EXISTS expenses ( id INT AUTO_INCREMENT PRIMARY KEY, diff --git a/index.php b/index.php index ca233bb..7c92072 100644 --- a/index.php +++ b/index.php @@ -4,6 +4,7 @@ require_once 'db/config.php'; + $pdo = db(); $message = null; $message_type = '';