Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): add database schema and setup prisma service #3

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

ahonn
Copy link
Collaborator

@ahonn ahonn commented Jul 12, 2024

DB design draft: https://www.notion.so/DB-design-36446d3dd8784e2bbc77c1e7db97d594#fe5eee86ba194cc0b64a4d22ff0b38a5

Some modifications(d52b2f3 , f91b194) were made based on the table structure in the draft:

  • Use Timestamp in Postgresql as the timestamp field type
  • Add the epoch field to the blocks table
  • Add blockId field to the blocks table
  • Add the TransactionStatus enum and status field to the transactions table
  • Rename generatedByTxId field to txId in outputs table
  • Rename content/contentSize to data/dataSize in outputs table
  • Rename accounts table to balances and remove account_no field
  • Add foreign keys to tables and use id to establish relations

@ahonn ahonn requested review from Flouse, shaojunda and ShookLyngs July 12, 2024 07:26
@ahonn ahonn force-pushed the feat/backend-database-schema branch from 128fee2 to 6ca9aff Compare July 12, 2024 13:05
@ahonn ahonn marked this pull request as ready for review July 12, 2024 13:05
@ahonn ahonn merged commit 3aed739 into main Jul 16, 2024
1 check passed
@ahonn ahonn deleted the feat/backend-database-schema branch July 16, 2024 05:28
@ahonn ahonn mentioned this pull request Jul 16, 2024
10 tasks
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