Add CLI command to auto-generate SQLAlchemy models from db
Includes option to refresh OMOP Postgres schemas from kids-first/CommonDataModel git repository.
Auto-generation involves generating the models from db first and then applying customizations such as adding additional columns (KF ID, timestamp, etc).
Notes
* This is a temporary command that would likely go away if OMOP is adopted and proper migrations are used to update models.
* In future, change the way pg scripts are acquired. Rather than git cloning kids-first/CommonDataModel, modify CLI command to take in a OHDSI/CommonDataModel release tag which would govern which release of the OMOP schema to download. Can't do this right now because the release we need (v6.0.0) has bugs in it, which are fixed on kids-first/CommonDataModel master.
Add CLI command to auto-generate SQLAlchemy models from db Includes option to refresh OMOP Postgres schemas from kids-first/CommonDataModel git repository.
Auto-generation involves generating the models from db first and then applying customizations such as adding additional columns (KF ID, timestamp, etc).
Notes
* This is a temporary command that would likely go away if OMOP is adopted and proper migrations are used to update models.
* In future, change the way pg scripts are acquired. Rather than git cloning kids-first/CommonDataModel, modify CLI command to take in a OHDSI/CommonDataModel release tag which would govern which release of the OMOP schema to download. Can't do this right now because the release we need (v6.0.0) has bugs in it, which are fixed on kids-first/CommonDataModel master.