Skip to content

[MSFNW26] Setup Sequlize#19

Merged
tonyqiu123 merged 4 commits intomainfrom
MSFNW26-setup-sequlize
Feb 8, 2026
Merged

[MSFNW26] Setup Sequlize#19
tonyqiu123 merged 4 commits intomainfrom
MSFNW26-setup-sequlize

Conversation

@tonyqiu123
Copy link
Contributor

@tonyqiu123 tonyqiu123 commented Feb 5, 2026

Notion ticket link

Ticket Name

Implementation description

  • Added Sequelize with TypeScript support (sequelize-typescript, pg) as the backend ORM for PostgreSQL.
  • Set up Umzug for TypeScript migrations with SequelizeStorage; migrations live in migrations/ and are run via migrate.js.
  • Added .sequelizerc for config/models/seeders/migrations paths; umzug.ts wires Sequelize (dev: POSTGRES_*, DB_HOST, POSTGRES_DB_DEV; prod: DATABASE_URL).
  • No new routes or models in this PR—setup only for future migrations and models.

Steps to test

  1. Start Postgres: docker-compose up -d db
  2. In backend/, add a .env with POSTGRES_USER, POSTGRES_PASSWORD, DB_HOST=db, POSTGRES_DB_DEV=mfsn_db
  3. Run cd backend && npm install then node migrate.js up (should succeed; no migrations yet is fine)
  4. Optionally run node migrate.js create --name example-migration.ts --folder migrations and node migrate.js up again to confirm migration creation

What should reviewers focus on?

  • Whether to add a .env.example or README note for DB_HOST and POSTGRES_DB_DEV
  • That umzug.ts path resolution from backend/ is correct when running node migrate.js

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@tonyqiu123 tonyqiu123 changed the title MSFNW26-setup-sequlize [MSFNW26] Setup Sequlize Feb 5, 2026
@tonyqiu123 tonyqiu123 requested a review from ericahan22 February 8, 2026 03:07
@tonyqiu123 tonyqiu123 force-pushed the MSFNW26-setup-sequlize branch from 0a59ef7 to b473d2a Compare February 8, 2026 04:48
@tonyqiu123 tonyqiu123 merged commit 2ecfcd6 into main Feb 8, 2026
1 check passed
@ericahan22 ericahan22 deleted the MSFNW26-setup-sequlize branch February 8, 2026 06:05
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.

2 participants