Skip to content

Add PostgreSQL support and pdo_pgsql extension#4

Open
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-q71cML
Open

Add PostgreSQL support and pdo_pgsql extension#4
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-q71cML

Conversation

@railway-app
Copy link
Copy Markdown
Contributor

@railway-app railway-app Bot commented Apr 3, 2026

Summary

Adds dual-database support so the app can connect to PostgreSQL in the dev environment (via Railway's DATABASE_URL) while continuing to use SQLite as the default fallback for local development. config.php's getDB() now checks for DATABASE_URL first and constructs a PostgreSQL PDO connection from it; if the variable is absent it falls back to the existing SQLite path. The Dockerfile gains a pdo_pgsql install step so the extension is available at runtime.

Changes

  • Modified config.php
  • Modified Dockerfile

Generated by Railway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants