-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[WIP] - SQL Model Data Layer #2469
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
base: main
Are you sure you want to change the base?
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.
I think the initial file should be the creation of the tables, right? So that new users do not have to problem to create the tables by themself.
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.
Today our SQL tables are stored in cameCase which is abnormal so my idea for the 1st migration would rename the problematic columns like threadId to thread_id. That would be the most "hands-off" migration. I have not actually done that here yet though.
Alternatively we could create brand new tables in a new database schema and use COPY INTO scripts.
I really don't think keeping these as camelCase would be good long term as we'd have to handle this into the future for all changes and it's not the right way to make SQL tables.
This PR is stale because it has been open for 14 days with no activity. |
@github-actions Leave this PR open |
Caution
This is currently a mockup and incomplete. This has not been tested and will not run.
This is an initial draft for consolidating all SQL data layers using FastAPI's sqlmodel (Pydantic + SQL Alchemy).
For now I have created the new models in a new models/ directory and are duplicated from step.py, element.py, etc. The idea would be to delete those once this is ready.
The main reasons for this change are:
replaces #1365
Notes:
metadata_
instead, then aliased for proper database and API usage.