hackforla / hackforla/peopledepot
Update Table: event
- Dominant language
- Python
- Stars
- 14
- Forks
- 37
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 5
Description
### Overview
We need to update the event table model to include new fields and have the correct names for fields.
#### Details
- The initial model issue: #14 & #173
### Action Items
Update existing Django model
- [x] In the files indicated by Resource 1.01, Change the following items in the code
| Current Name in code | Updated Name | Updated Type (may already be this type) | FK Table | FK Table Issue(s) |
| -------------------- | ------------ | --------------------------------------- | -------- | ----------------- |
| project_id | project | UUID | #16 & #197 & #607 |
| brigade_id | org | UUID | #56
- [ ] Add the following items in the code
| Name | Type | FK Table | FK Table Issue(s) | Comment |
| --- | --- | --- | --- | --- |
| description | varchar | | | ❓make it TextField? |
| event\_type | UUID | eventtype | #50 | |
| location | UUID | location | #44 | |
| last\_generated | DateTimeField | | | This field is used by the client to see when the backend last regenerated meeting data. |
| previous-version | UUID | event | #14 & #173 | This points to another event object which preceded this one. Something changed that required generating this event to replace the old one. |
| ended\_on | Date | | | This records the time when this event object is superceded by a newer version. The newest version will not have this value.
❓Should this be Datetime? |
- [x] Write a test for the new relationships this model will have with other models (e.g., creating a user and assigning them a set of permissions on a project) if any.
- [x] Update API end point
- [x] Update API unit tests
- [ ] generate a schema table description (see resources 1.04), post it in a comment below, and add a link to it in the Update Schema dependency issue
- [ ] Document the endpoint in ReDocs (see resources 1.05)
- [ ] Remove the following items in the code
| Name |
| --- |
| timezone |
### FK status
- #16
- #197
- #607
- #56
- #50
- #44
- #14
- #173
### Resources
- 1.01 Code locations
- 1.01.01 [/app/core/models.py](https://github.com/hackforla/peopledepot/blob/main/app/core/models.py)
- 1.01.02 [/app/core/admin.py](https://github.com/hackforla/peopledepot/blob/main/app/core/admin.py)
- 1.01.03 [/app/core/api/serializers.py](https://github.com/hackforla/peopledepot/blob/main/app/core/api/serializers.py)
- 1.01.04 [/app/core/api/views.py](https://github.com/hackforla/peopledepot/blob/main/app/core/api/views.py)
- 1.02 [People Depot Resources wiki page](https://github.com/hackforla/peopledepot/wiki/Resources-and-Links) for links
- ERD
- Table and Field Definitions
- API Endpoint
- 1.03 Spreadsheet: [PD: Table and field explanations, Current Field Permission tab](https://docs.google.com/spreadsheets/d/1x_zZ8JLS2hO-zG0jUocOJmX16jh-DF5dccrd_OEGNZ0/edit?gid=749942651)
-1.03.01 [event filter](https://docs.google.com/spreadsheets/d/1x_zZ8JLS2hO-zG0jUocOJmX16jh-DF5dccrd_OEGNZ0/edit?gid=749942651#gid=749942651&fvid=1510661009)
- 1.04 [Instructions for how to generate a schema table description](https://hackforla.github.io/peopledepot/contributing/howto/generate-db-table-description/)
- 1.05 [Instructions for how to Document End point](https://hackforla.github.io/peopledepot/contributing/howto/add-model-and-api-endpoints/#add-viewset) step 3
Contributor guide
Assessment
This issue has not been assessed yet.