-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This ticket makes several updates to support the implementation of schedule versioning and schedule history. First off, the `events` table has been updated with the following columns: - **version** - a string in the format `YYYYMMDD-n`, where `n` is the nth change on a given date - **periodicity** - the `type` column from the `periodicity` table - **start_date** - the `start_date` column from the `periodicity` table - **end_date** - the `end_date` column from the `periodicity` table - **selected_date** - the `selected_date` column from the `periodicity` table Only the **version** column is required to support schedule versioning, but merging the periodicity columns with the events table simplifies a lot of the querying logic. A number of new tables have also been created according to the ER diagram in the ticket: - **event_histories** - keeps track of event versions - **applet_events** - keeps track of which versions of a schedule are related to which versions of an applet - **notification_histories** - The notifications tied to a particular schedule version - **reminder_histories** - The reminder tied to a particular schedule version As part of this implementation, I decided to forego the creation of the `user_event_histories`, `activity_event_histories`, and `flow_event_histories` tables and include the `user_id`, `activity_id`, and `activity_flow_id` columns respectively directly in the `event_histories` table. This merging simplifies queries, since these would have been one-to-one relationships with no extra data. Finally, I updated the various event data structures being returned from the backend to include the version property. Since no data is being migrated as part of this ticket, the version property will always be `null` for now.
- Loading branch information
1 parent
cbf2869
commit 0ff23ae
Showing
8 changed files
with
282 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.