AAI-119 Initialize user management database#34
Conversation
amandazhuyilan
left a comment
There was a problem hiding this comment.
Thanks - overall looks good. One question: is the intention that we eventually move / upgrade our current schemas (ex: BPARegistrationRequest) to the db/models.py?
Not all schemas, just the schemas for data we store in Auth0 metadata. We would still have pydantic schemas for the data we send/receive in web requests. We can start porting the Auth0 metadata over to the DB, we should just work out exactly what we still need, e.g. do we still need resources? |
Good point - I think from the direction conversations are moving with BPA and Galaxy, we won't be needing a |
|
Yes, let's merge this in, and work out exactly what data we need in the DB in a future ticket. |
Description
AAI-119: set up an initial database with
sqlmodel/sqlalchemyChanges
sqlmodelto set up and configure a database that can be used with FastAPIalembicso we can track DB migrations. NOTE: have not created the initial migrations yet, as this is best done once the app is deployed and we can generate the migrations against the AWS database.GroupMembershipDB model so we have a data model we can testChecklist
How to Test Manually (if necessary)
Set
DB_URLin the.envfile, e.g.DB_URL=sqlite:///database.db. Runuv run pytestto run unit tests.