-
Notifications
You must be signed in to change notification settings - Fork 11
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
Script to test ORM vs core + fixes #85
Conversation
MatBarba
commented
Sep 13, 2024
- Create a simple test script (to run manually) to test load all the tables defined in the ORM from a real core database, to flag any that fail to load
- Fix a few table definitions by removing an extra primary key in the *_attrib tables, and replacing them with a primary_key parameter on the columns the core schema use as unique
- NB: I also had to fix the string length to a definite value String(500), because SQLAlchemy needs that to create a primary key constraint in MySQL. This works now, but it might be problematic if we want to use the ORM to load very long attribs into a database. The best way to handle this really would be to alter the core SQL schema to have an explicit primary key as a simple autoincremented row ID.
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.
Looks good, and thank you for the new test, quite useful.
Re. the primary key and |
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.
Approved, just wanted to ask if the changes to models will now be in place but still requires changes to the scehma itself to conform ? How does that affect models utility in the interim ?
Co-authored-by: J. Alvarez-Jarreta <[email protected]>
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.
"URL vs server details" discussion left, otherwise looks good 👍
Right now the SQL schema from If we apply my recommendation to add an explicit key to all *_attrib tables, then we would just need to change the |