Skip to content

Switch DB from SQLite to Postgres.#1

Open
Jeyididya wants to merge 3 commits into
ami798:mainfrom
Jeyididya:db-remote
Open

Switch DB from SQLite to Postgres.#1
Jeyididya wants to merge 3 commits into
ami798:mainfrom
Jeyididya:db-remote

Conversation

@Jeyididya
Copy link
Copy Markdown

What this PR does:

  • Replaces SQLite with PostgreSQL as the database backend.
  • All existing table structures and methods are preserved.
  • Uses CREATE TABLE IF NOT EXISTS and ALTER TABLE ... IF NOT EXISTS for safe initialization in serverless environments.
  • Uses psycopg2 .
  • Environment variables are used for DB credentials (DB_HOST, DB_NAME, DB_USER, DB_PASS, DB_PORT).
  • Prepares the code for serverless hosting (e.g., Vercel cron functions) by making table initialization safe and efficient.

Why this change is needed:

  • SQLite cannot be used reliably on serverless platforms like Vercel.
  • Postgres provides persistent, cloud-hosted storage suitable for cron-based reminders and long-term scaling.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 5, 2026

@Jeyididya is attempting to deploy a commit to the Amira's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant