-make sure that new default database values are populated

This commit is contained in:
Martin Konecny 2012-05-30 16:31:22 -04:00
parent 01ed9cdb35
commit 073837efc6
1 changed files with 9 additions and 0 deletions

View File

@ -55,6 +55,7 @@ ALTER TABLE cc_files
ALTER COLUMN length SET DEFAULT '00:00:00'::interval;
UPDATE cc_files SET utime = now()::timestamp(0);
UPDATE cc_files SET length = '00:00:00' WHERE length is NULL;
ALTER TABLE cc_music_dirs
ADD COLUMN "exists" boolean DEFAULT true,
@ -81,6 +82,10 @@ ALTER TABLE cc_playlistcontents
ALTER COLUMN cueout TYPE interval /* TYPE change - table: cc_playlistcontents original: time without time zone new: interval */,
ALTER COLUMN cueout SET DEFAULT '00:00:00'::interval;
UPDATE cc_playlistcontents SET cliplength = '00:00:00' WHERE cliplength is NULL;
UPDATE cc_playlistcontents SET cuein = '00:00:00' WHERE cuein is NULL;
UPDATE cc_playlistcontents SET cueout = '00:00:00' WHERE cueout is NULL;
ALTER TABLE cc_schedule
DROP COLUMN playlist_id,
DROP COLUMN group_id,
@ -94,6 +99,10 @@ ALTER TABLE cc_schedule
ALTER COLUMN cue_out TYPE interval /* TYPE change - table: cc_schedule original: time without time zone new: interval */,
ALTER COLUMN cue_out SET DEFAULT '00:00:00'::interval;
UPDATE cc_schedule SET clip_length = '00:00:00' WHERE clip_length is NULL;
UPDATE cc_schedule SET cue_in = '00:00:00' WHERE cue_in is NULL;
UPDATE cc_schedule SET cue_out = '00:00:00' WHERE cue_out is NULL;
ALTER TABLE cc_show
ADD COLUMN live_stream_using_airtime_auth boolean DEFAULT false,
ADD COLUMN live_stream_using_custom_auth boolean DEFAULT false,