Release v2.4.2
This commit is contained in:
+42
-196
@@ -55,11 +55,12 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
## Content
|
||||
|
||||
- `c_canvas_sizes` - reusable canvas presets for templates.
|
||||
- `c_playlists` - playlist definitions and playback options.
|
||||
- `c_playlists` - playlist definitions, playback options, and canvas assignment.
|
||||
- `c_templates` - slide templates with canvas and background settings.
|
||||
- `c_template_regions` - template region layout and metadata.
|
||||
- `c_slides` - slide records with template binding, JSON content, and thumbnail path.
|
||||
- `c_playlist_slides` - ordered playlist items, timing, and schedule rules.
|
||||
- `c_playlist_slides` - ordered playlist items and timing.
|
||||
- `c_playlist_slide_schedule_rules` - rule rows attached to playlist slides.
|
||||
|
||||
### `c_canvas_sizes`
|
||||
|
||||
@@ -68,7 +69,9 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
|
||||
### `c_playlists`
|
||||
|
||||
- `id`, `name`, `fade_between_slides`, `skip_unavailable_rtmp`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- `id`, `name`, `fade_between_slides`, `skip_unavailable_rtmp`, `canvas_id`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- Foreign key:
|
||||
- `canvas_id` -> `c_canvas_sizes.id` with `ON DELETE SET NULL`
|
||||
|
||||
### `c_templates`
|
||||
|
||||
@@ -90,11 +93,22 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
|
||||
### `c_playlist_slides`
|
||||
|
||||
- `id`, `playlist_id`, `slide_id`, `position`, `duration_seconds`, `use_video_duration`, `schedule_mode`, `schedule_start_datetime`, `schedule_end_datetime`, `schedule_start_time`, `schedule_end_time`, `schedule_days_json`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- `id`, `playlist_id`, `slide_id`, `position`, `duration_seconds`, `use_video_duration`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- Foreign keys:
|
||||
- `playlist_id` -> `c_playlists.id` with `ON DELETE CASCADE`
|
||||
- `slide_id` -> `c_slides.id` with `ON DELETE CASCADE`
|
||||
|
||||
### `c_playlist_slide_schedule_rules`
|
||||
|
||||
- `id`, `playlist_slide_id`, `position`, `start_datetime`, `end_datetime`, `start_time`, `end_time`, `schedule_days_json`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- Foreign key:
|
||||
- `playlist_slide_id` -> `c_playlist_slides.id` with `ON DELETE CASCADE`
|
||||
- Index:
|
||||
- `(playlist_slide_id, position)`
|
||||
|
||||
- Each playlist slide can have zero or more schedule rules.
|
||||
- Rules are evaluated with OR across rows and with AND across the fields inside a single rule.
|
||||
|
||||
## Devices
|
||||
|
||||
- `d_players` - player registry and connection metadata.
|
||||
@@ -150,6 +164,8 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
- `i_rss_feeds` - RSS feed definitions and refresh cadence.
|
||||
- `i_rss_feed_items` - cached RSS feed items.
|
||||
- `i_api_sources` - API source definitions and last response snapshot.
|
||||
- `i_schedule_groups` - grouped schedule definitions used by the schedule region.
|
||||
- `i_schedule_entries` - dated entries that belong to a schedule group.
|
||||
|
||||
### `i_rss_feeds`
|
||||
|
||||
@@ -167,6 +183,18 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
|
||||
- `id`, `name`, `api_url`, `auth_method`, `auth_username`, `auth_password`, `auth_bearer_token`, `auth_header_name`, `auth_header_value`, `items_path`, `update_interval_value`, `update_interval_unit`, `last_pulled_at`, `last_pull_error`, `last_response_status`, `last_response_content_type`, `last_response_json`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
|
||||
### `i_schedule_groups`
|
||||
|
||||
- `id`, `name`, `short_description`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
|
||||
### `i_schedule_entries`
|
||||
|
||||
- `id`, `schedule_group_id`, `title`, `short_description`, `start_datetime`, `end_datetime`, `created_at`, `created_by`, `modified_at`, `modified_by`
|
||||
- Foreign key:
|
||||
- `schedule_group_id` -> `i_schedule_groups.id` with `ON DELETE CASCADE`
|
||||
- Index:
|
||||
- `(schedule_group_id, start_datetime)`
|
||||
|
||||
## Operations
|
||||
|
||||
- `o_background_tasks` - queue and history for background jobs.
|
||||
@@ -179,243 +207,58 @@ Primary keys are `id` unless noted otherwise. Timestamps are stored as `created_
|
||||
## Notes
|
||||
|
||||
- The schema is initialized with `CREATE TABLE IF NOT EXISTS`, so new installs can start from an empty database.
|
||||
- `src/db/index.js` also seeds default permissions and the default administrator role.
|
||||
- `src/db/bootstrap.js` seeds the canvas size defaults, default permissions, and the default administrator role.
|
||||
- The migration module stays in place for future releases, but this version treats the current schema as the install baseline.
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
A_USERS {
|
||||
INT id
|
||||
VARCHAR name
|
||||
VARCHAR username
|
||||
CHAR password_hash
|
||||
VARCHAR password_salt
|
||||
INT password_iterations
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
A_ROLES {
|
||||
INT id
|
||||
VARCHAR role_key
|
||||
VARCHAR name
|
||||
TEXT description
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
A_PERMISSIONS {
|
||||
INT id
|
||||
VARCHAR permission_key
|
||||
VARCHAR name
|
||||
VARCHAR section_name
|
||||
TEXT description
|
||||
TIMESTAMP created_at
|
||||
TIMESTAMP modified_at
|
||||
}
|
||||
A_ROLE_PERMISSIONS {
|
||||
INT role_id
|
||||
INT permission_id
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
A_USER_ROLES {
|
||||
INT user_id
|
||||
INT role_id
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
A_SESSIONS {
|
||||
CHAR session_hash
|
||||
INT user_id
|
||||
DATETIME expires_at
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP last_used_at
|
||||
INT modified_by
|
||||
}
|
||||
C_CANVAS_SIZES {
|
||||
INT id
|
||||
VARCHAR name
|
||||
INT width
|
||||
INT height
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_PLAYLISTS {
|
||||
INT id
|
||||
VARCHAR name
|
||||
TINYINT fade_between_slides
|
||||
TINYINT skip_unavailable_rtmp
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_TEMPLATES {
|
||||
INT id
|
||||
VARCHAR name
|
||||
INT canvas_size_id
|
||||
VARCHAR background_image_path
|
||||
VARCHAR background_color
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_TEMPLATE_REGIONS {
|
||||
INT id
|
||||
INT template_id
|
||||
VARCHAR region_key
|
||||
VARCHAR region_type
|
||||
VARCHAR label
|
||||
VARCHAR font_family
|
||||
VARCHAR lock_ratio
|
||||
INT x
|
||||
INT y
|
||||
INT width
|
||||
INT height
|
||||
INT z_index
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_SLIDES {
|
||||
INT id
|
||||
VARCHAR title
|
||||
INT template_id
|
||||
JSON content_json
|
||||
VARCHAR thumbnail_path
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_PLAYLIST_SLIDES {
|
||||
INT id
|
||||
INT playlist_id
|
||||
INT slide_id
|
||||
INT position
|
||||
DECIMAL duration_seconds
|
||||
TINYINT use_video_duration
|
||||
VARCHAR schedule_mode
|
||||
DATETIME schedule_start_datetime
|
||||
DATETIME schedule_end_datetime
|
||||
TIME schedule_start_time
|
||||
TIME schedule_end_time
|
||||
JSON schedule_days_json
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
C_PLAYLIST_SLIDE_SCHEDULE_RULES {
|
||||
}
|
||||
D_PLAYERS {
|
||||
INT device_id
|
||||
VARCHAR public_base_url
|
||||
VARCHAR internal_base_url
|
||||
TIMESTAMP last_seen_at
|
||||
TIMESTAMP created_at
|
||||
TIMESTAMP modified_at
|
||||
}
|
||||
D_SCREENS {
|
||||
INT id
|
||||
VARCHAR name
|
||||
VARCHAR slug
|
||||
INT playlist_id
|
||||
INT player_id
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
D_ONBOARDING_DEVICES {
|
||||
VARCHAR device_id
|
||||
VARCHAR client_name
|
||||
INT screen_id
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
D_ANNOUNCEMENTS {
|
||||
INT id
|
||||
TEXT message
|
||||
VARCHAR short_label
|
||||
VARCHAR announcement_type
|
||||
VARCHAR color_key
|
||||
VARCHAR icon_key
|
||||
INT duration_seconds
|
||||
TIMESTAMP expires_at
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
D_ANNOUNCEMENT_SCREENS {
|
||||
INT announcement_id
|
||||
INT screen_id
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
I_RSS_FEEDS {
|
||||
INT id
|
||||
VARCHAR name
|
||||
VARCHAR feed_url
|
||||
INT update_interval_value
|
||||
VARCHAR update_interval_unit
|
||||
INT item_limit
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
I_RSS_FEED_ITEMS {
|
||||
INT id
|
||||
INT rss_feed_id
|
||||
INT position
|
||||
MEDIUMTEXT item_json
|
||||
TIMESTAMP created_at
|
||||
INT created_by
|
||||
TIMESTAMP modified_at
|
||||
INT modified_by
|
||||
}
|
||||
I_API_SOURCES {
|
||||
INT id
|
||||
VARCHAR name
|
||||
VARCHAR api_url
|
||||
INT update_interval_value
|
||||
VARCHAR update_interval_unit
|
||||
TIMESTAMP last_pulled_at
|
||||
MEDIUMTEXT last_pull_error
|
||||
INT last_response_status
|
||||
VARCHAR last_response_content_type
|
||||
MEDIUMTEXT last_response_json
|
||||
}
|
||||
I_SCHEDULE_GROUPS {
|
||||
}
|
||||
I_SCHEDULE_ENTRIES {
|
||||
}
|
||||
O_BACKGROUND_TASKS {
|
||||
BIGINT id
|
||||
VARCHAR task_key
|
||||
VARCHAR task_type
|
||||
VARCHAR title
|
||||
VARCHAR category
|
||||
VARCHAR status
|
||||
MEDIUMTEXT payload_json
|
||||
MEDIUMTEXT metadata_json
|
||||
INT attempts
|
||||
TIMESTAMP created_at
|
||||
TIMESTAMP started_at
|
||||
TIMESTAMP finished_at
|
||||
MEDIUMTEXT error_message
|
||||
}
|
||||
|
||||
A_USERS ||--o{ A_USER_ROLES : has
|
||||
@@ -425,10 +268,12 @@ erDiagram
|
||||
A_USERS ||--o{ A_SESSIONS : owns
|
||||
|
||||
C_CANVAS_SIZES ||--o{ C_TEMPLATES : used_by
|
||||
C_CANVAS_SIZES ||--o{ C_PLAYLISTS : used_by
|
||||
C_TEMPLATES ||--o{ C_TEMPLATE_REGIONS : contains
|
||||
C_TEMPLATES ||--o{ C_SLIDES : used_by
|
||||
C_PLAYLISTS ||--o{ C_PLAYLIST_SLIDES : contains
|
||||
C_SLIDES ||--o{ C_PLAYLIST_SLIDES : included_in
|
||||
C_PLAYLIST_SLIDES ||--o{ C_PLAYLIST_SLIDE_SCHEDULE_RULES : has_rules
|
||||
|
||||
D_PLAYERS ||--o{ D_SCREENS : assigned_to
|
||||
C_PLAYLISTS ||--o{ D_SCREENS : uses
|
||||
@@ -437,4 +282,5 @@ erDiagram
|
||||
D_SCREENS ||--o{ D_ANNOUNCEMENT_SCREENS : receives
|
||||
|
||||
I_RSS_FEEDS ||--o{ I_RSS_FEED_ITEMS : caches
|
||||
I_SCHEDULE_GROUPS ||--o{ I_SCHEDULE_ENTRIES : contains
|
||||
```
|
||||
Reference in New Issue
Block a user