CC-1985: Automatic rebroadcast of recorded content
populates rebroadcast show instances now, added a new table cc_show_rebroadcast, added columns record, rebroadcast, instance_id, file_id to cc_show_instances table. added column record to cc_show_days.
This commit is contained in:
parent
eb2caf0adc
commit
6ef4169315
36 changed files with 4776 additions and 155 deletions
|
@ -22,22 +22,3 @@ CREATE FUNCTION calculate_position() RETURNS trigger AS
|
|||
CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON cc_playlistcontents
|
||||
FOR EACH ROW EXECUTE PROCEDURE calculate_position();
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
--show_content()
|
||||
----------------------------------------------------------------------------------
|
||||
DROP FUNCTION show_content() CASCADE;
|
||||
|
||||
CREATE FUNCTION show_content() RETURNS trigger AS
|
||||
'
|
||||
BEGIN
|
||||
IF(TG_OP=''DELETE'') THEN
|
||||
UPDATE cc_show_schedule SET position = (position - 1)
|
||||
WHERE (instance_id = old.instance_id AND position > old.position);
|
||||
END IF;
|
||||
RETURN NULL;
|
||||
END;
|
||||
'
|
||||
LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER show_content AFTER INSERT OR DELETE ON cc_show_schedule
|
||||
FOR EACH ROW EXECUTE PROCEDURE show_content();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue