Skip to content

feat: migrate from MySQL to PostgreSQL - #7

Merged
PlayerNguyen merged 2 commits into
masterfrom
feat/postgresql-migration
Jul 8, 2026
Merged

feat: migrate from MySQL to PostgreSQL#7
PlayerNguyen merged 2 commits into
masterfrom
feat/postgresql-migration

Conversation

@PlayerNguyen

Copy link
Copy Markdown
Owner

Summary

Migrate the database layer from MySQL 8 to PostgreSQL 17 for better type support (JSONB, UUID, native arrays) and alignment with modern application standards.

Changes

  • Docker: Replace MySQL 8 with PostgreSQL 17 in docker-compose.yml
  • Init script: Create .config/postgres/init.sql, delete .config/mysql/
  • Prisma schema: Change provider from mysql to postgresql
  • Dependencies: Swap @prisma/adapter-mariadb for @prisma/adapter-pg
  • Client: Update packages/database/src/index.ts and seed.ts to use PrismaPg
  • Env vars: Update .env.example, .env.test, prisma.config.ts connection strings
  • CI/CD: Replace MySQL service with PostgreSQL 17 in .github/workflows/bun-test.yml
  • Migrations: Delete old MySQL migrations (will regenerate on bun run migrate)

Verification

After merging, run:

  1. docker compose up db
  2. bun run migrate
  3. bun run seed
  4. bun run test

PlayerNguyen added 2 commits July 8, 2026 15:42
- Replace MySQL 8 with PostgreSQL 17 in docker-compose.yml
- Create .config/postgres/init.sql, delete .config/mysql/
- Change Prisma provider from mysql to postgresql
- Swap @prisma/adapter-mariadb for @prisma/adapter-pg
- Update Prisma client and seed script to use PrismaPg adapter
- Update .env.example, .env.test, and prisma.config.ts connection strings
- Replace MySQL service with PostgreSQL 17 in CI workflow
- Delete old MySQL migrations (will regenerate on migrate)
@PlayerNguyen
PlayerNguyen merged commit dee338b into master Jul 8, 2026
1 check failed
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