-
Notifications
You must be signed in to change notification settings - Fork 323
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(persistence): get or delete projects using sql #2839
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let some comments. A tad confused by the indexes....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Are indexes created anonymously able to be migrated?
- I think you can remove the projects table from one more query.
Project( | ||
id_attr=project.id, | ||
name=project.name, | ||
project=info.context.traces.get_project(project.name), # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up, it might make sense to key the core projects by ID rather than name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the (in-memory) core projects will be deleted after migration, so this is moot.
sa.Integer, | ||
sa.ForeignKey("projects.id", ondelete="CASCADE"), | ||
nullable=False, | ||
index=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these indexes anonymous? Do we need to explicitly name them in order to run migrations on them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolves #2838