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

Update/db schema #320

Merged
merged 6 commits into from
Apr 20, 2023
Merged

Update/db schema #320

merged 6 commits into from
Apr 20, 2023

Conversation

ccali11
Copy link
Contributor

@ccali11 ccali11 commented Apr 19, 2023

@shanejearley - The primary purpose of this branch / PR is to make our PG schema more flexible in terms of handling the permutations (combinations?) of users and addresses (accounts as well) from a web3 perspective (e.g., previously, our schema was preventing two separate users from sharing an address in their list of accounts AND it was preventing a user from switching their primary address to another address). To achieve this, a simple PG generated/managed id is used on both the users and accounts table, and a third composite table is used to associate users with accounts.

There are probably ways to optimize the postgres.ts and schema.ts scripts, but focused on getting it working and figured we can settle on the general direction first before optimizations.

We can defer to async review, but let me know if you'd like to review sync at any point.

@ccali11
Copy link
Contributor Author

ccali11 commented Apr 20, 2023

@shanejearley - Need approval to merge this.

@ccali11 ccali11 requested a review from DemogorGod April 20, 2023 17:15
Copy link
Contributor

@DemogorGod DemogorGod left a comment

Choose a reason for hiding this comment

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

Approved apon request

@ccali11 ccali11 merged commit b7d7e7f into develop Apr 20, 2023
@ccali11 ccali11 deleted the update/db-schema branch April 20, 2023 17:18
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.

3 participants