You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several "static models" such as \Biigle\Role that are never changed. They only have an ID and a name and exist as foreign keys on several tables. To speed things up, these models are completely cached. But they don't have to exist in the database at all. They could basically be enums with fixed IDs and values. The IDs are put into the database as well but not as foreign keys to a table. This way, no foreign key checks are required, no queries are required and no caching is required.
Implement the static models as enums (or similar) with ID and name. Implement a migration that first updates all existing foreign key colums so the previous IDs of the static models match the new hard-coded IDs. Then drop the static model database tables.
Static models in biigle/core:
\Biigle\MediaType
\Biigle\Role
\Biigle\Shape
\Biigle\Visibility
\Biigle\ReportType
Static models in biigle/maia:
MaiaJobState
The text was updated successfully, but these errors were encountered:
There are several "static models" such as \Biigle\Role that are never changed. They only have an ID and a name and exist as foreign keys on several tables. To speed things up, these models are completely cached. But they don't have to exist in the database at all. They could basically be enums with fixed IDs and values. The IDs are put into the database as well but not as foreign keys to a table. This way, no foreign key checks are required, no queries are required and no caching is required.
Implement the static models as enums (or similar) with ID and name. Implement a migration that first updates all existing foreign key colums so the previous IDs of the static models match the new hard-coded IDs. Then drop the static model database tables.
Static models in biigle/core:
Static models in biigle/maia:
The text was updated successfully, but these errors were encountered: