-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds new series block configurable default values. - Extend video list order with the `A-Z` and `Z-A` options. - Add video list view options (List, Gallery, Slider) 
- Loading branch information
Showing
11 changed files
with
160 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- This adds a single `videolist_view` field of type `video_list_view` to blocks, | ||
-- used for series to define the view | ||
|
||
create type video_list_view as enum ('slider', 'gallery', 'list'); | ||
|
||
-- Add new `videolist_view` column with default value to initialize existing series blocks | ||
alter table blocks | ||
add column videolist_view video_list_view default 'gallery'; | ||
|
||
-- Drop column default and add constraints to ensure that series blocks have all required fields | ||
alter table blocks | ||
alter column videolist_view drop default, | ||
drop constraint series_block_has_fields, | ||
add constraint series_block_has_fields check (type <> 'series' or ( | ||
videolist_order is not null and | ||
videolist_view is not null and | ||
show_title is not null and | ||
show_metadata is not null | ||
)); | ||
|
||
-- Extend `video_list_order` type to support additional sort orders | ||
alter type video_list_order add value 'a_to_z'; | ||
alter type video_list_order add value 'z_to_a'; |
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.