Skip to content

Conversation

@SamNie2027
Copy link

@SamNie2027 SamNie2027 commented Sep 26, 2025

ℹ️ 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?

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