When Magma boots, it calls Magma#load_models to attach to the database and make the data available via Sequel. The main thing this does is connect to the database, instantiate projects, load the project models, and validate the models.
All of this should continue; we wish to change only Magma::Project#load_project, which calls require_files('models'), which includes the models/ directory code in project-specific repos. Instead we wish to achieve the exact same result as this require operation - that is, we have a bunch of model classes < Magma::Model with the correct set of attribute definitions.
To make this change, we might replace require_files('models') with load_project_models, which reads the model definitions from the attributes table and constitutes a new set of magma models.
When Magma boots, it calls Magma#load_models to attach to the database and make the data available via Sequel. The main thing this does is connect to the database, instantiate projects, load the project models, and validate the models.
All of this should continue; we wish to change only Magma::Project#load_project, which calls
require_files('models')
, which includes the models/ directory code in project-specific repos. Instead we wish to achieve the exact same result as this require operation - that is, we have a bunch of model classes < Magma::Model with the correct set of attribute definitions.To make this change, we might replace
require_files('models')
withload_project_models
, which reads the model definitions from the attributes table and constitutes a new set of magma models.