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

move of osparc.io: make db tables ready for merging #1867

Open
3 of 63 tasks
mrnicegyu11 opened this issue Mar 17, 2025 · 1 comment
Open
3 of 63 tasks

move of osparc.io: make db tables ready for merging #1867

mrnicegyu11 opened this issue Mar 17, 2025 · 1 comment
Assignees
Labels
High Priority a totally crucial bug/feature to be fixed asap
Milestone

Comments

@mrnicegyu11
Copy link
Member

mrnicegyu11 commented Mar 17, 2025

The plan is to insert / upsert the DB of osparc into the DB of sim4life. To do this, all osparc postgres tables will be audited and made ready for this procedure. Some tables might be empty (by design), some tables might not need to be moved and can be dropped, and some tables might need adjustments.

In order to avoid collisions in the DB, such as with tables that have monotonically increasing primary keys starting from 1, we have identified two ways to make the DB-tables of osparc.io "ready":

  1. Add a large integer (needs to be determined individually) to all primary keys of osparc.io OR sim4life.io, to avoid collisions. [Note: This doesnt always work, e.g. in the users DB mail adresses are presumably expected to be unique even though they are not enforced to be unique in postgres?
  2. Add the product as a second primary key and thereby make combinations of user-id & product etc. unique.

Likely, both ways would go via a PR with an alembic migration

@sanderegg
Copy link
Member

  • wallet_id is an INTeger and can likely not be changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority a totally crucial bug/feature to be fixed asap
Projects
None yet
Development

No branches or pull requests

6 participants