OH-SHOWN / ohshown-backend

OH!SHOWN 野生動物出沒痕跡通報系統
http://ohshown.site
MIT License
2 stars 8 forks source link

create new table - bear #69

Closed tai271828 closed 1 year ago

tai271828 commented 2 years ago

splited from #44

tai271828 commented 2 years ago

I am working on this issue. My current progress:

Got the data generated from the frontend via post_body https://github.com/OH-SHOWN/ohshown-backend/blob/main/backend/api/views/factories_cr.py#L80

Next step:

  1. Extend new_factory_field https://github.com/OH-SHOWN/ohshown-backend/blob/main/backend/api/views/factories_cr.py#L105
  2. Refactor the atomic transaction OhshownEvent.objects.create https://github.com/OH-SHOWN/ohshown-backend/blob/main/backend/api/views/factories_cr.py#L124 so it can inject new data to tables
  3. I have not figured out how to create new schema properly. It must be something in api/models and django migration. I will try to figure this out.
tai271828 commented 1 year ago

Landed https://github.com/OH-SHOWN/ohshown-backend/pull/81/files . Close this issue.