From 16b540ef7f9eaec1b0fc5e17f037b64770b2ac98 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 22 Mar 2023 16:12:54 -0400 Subject: [PATCH] Add 'years' --- years.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 years.md diff --git a/years.md b/years.md new file mode 100644 index 0000000..d86df5a --- /dev/null +++ b/years.md @@ -0,0 +1,23 @@ +The `years` table holds information for year playlists. + +### Columns +| Name | Type | Description | +| --------------------------------- | ------- | ----------------------------------- | +| year | INTEGER | The year | +| [propertyid](playlist_properties) | INTEGER | The rowid of this year's properties | + +### Triggers +| Name | When | Description | +| -------------------- | ------------ | ------------------------------------------------------------- | +| years_insert_trigger | After insert | Create a new row in the [[playlist_properties]] table | +| years_delete_trigger | After delete | Delete this year's entry in the [[playlist_properties]] table | + +### The `years_view` +The `years_view` joins the `years` table with the [[playlist_properties]] table so the application can use one query to access all the relevant state for each year. + +| Column | Description | +| --------------------------------- | ------------------------------------------------------ | +| year | The year | +| [propertyid](playlist_properties) | The rowid of the [[playlist_properties]] for this year | +| name | The year formatted as a string | +| [active](playlist_properties) | The active state of this year | \ No newline at end of file