Skip to content

Conversation

@SamNie2027
Copy link

ℹ️ Issue

Closes Database schema & migration #4

📝 Description

Created Donation TypeORM according to acceptance criteria

Added files:
apps/backend/src/donations/donation.entity.ts
apps/backend/src/migrations/1758917198934-add_donations.ts

Changed files:
apps/backend/src/data-source.ts

✔️ Verification

Tested:

yarn docker:up:dev -> leads to (in postgres cli)
fcc_dev=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------+-------+----------
public | migrations | table | postgres
(1 row)

yarn docker:migrate:dev -> leads to (in postgres cli)
fcc_dev=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------+-------+----------
public | donations | table | postgres
public | migrations | table | postgres
public | users | table | postgres
(3 rows)

yarn docker:migrate:revert -> leads to (in postgres cli)
fcc_dev=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------+-------+----------
public | migrations | table | postgres
(1 row)

Also the table schema in postgres cli:
image

🏕️ (Optional) Future Work / Notes

Users and Donations table are being migrated together through this implementation: Is this fine or is this not good practice?

@SamNie2027 SamNie2027 linked an issue Sep 28, 2025 that may be closed by this pull request
Copy link
Collaborator

@thaninbew thaninbew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thanks for the detailed verification timelines in your PR. Just requesting a few minor changes.

@SamNie2027
Copy link
Author

Added requested changes, here's the new schema in psql

image

@thaninbew
Copy link
Collaborator

great work thank you!

@thaninbew thaninbew merged commit f9be42d into main Sep 29, 2025
@thaninbew thaninbew deleted the 4-Database-schema-and-migration branch September 29, 2025 20:00
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.

Database schema & migration

3 participants