Add 'decades'

Anna Schumaker 2023-03-22 16:09:49 -04:00
parent 5579a40d4c
commit 6332b186b9
1 changed files with 23 additions and 0 deletions

23
decades.md Normal file

@ -0,0 +1,23 @@
The `decades` table holds information for decade playlists.
### Columns
| Name | Type | Description |
| --------------------------------- | ------- | ------------------------------------- |
| decade | INTEGER | The decade |
| [propertyid](playlist_properties) | INTEGER | The rowid of this decade's properties |
### Triggers
| Name | When | Description |
| ---------------------- | ------------ | --------------------------------------------------------------- |
| decades_insert_trigger | After insert | Create a new row in the [[playlist_properties]] table |
| decades_delete_trigger | After delete | Delete this decade's entry in the [[playlist_properties]] table |
### The `decades_view`
The `decades_view` joins the `decades` table with the [[playlist_properties]] table so the application can use one query to access all the relevant state for each decade.
| Column | Description |
| --------------------------------- | ------------------------------------------------------- |
| decade | The decade |
| [propertyid](playlist_properties) | The rowid of the [[playlist_properties]] for this genre |
| name | The decade formatted as a string |
| [active](playlist_properties) | The active state of this decade |