CC-1672 Implement scheduler class in PHP

Part 1 of this implementation
This implementation keeps the playlists separate from the scheduler.
The scheduler keeps it's own copy of the list of things to play.

Support for adding single audio files to the scheduler is mostly implemented.
Adding playlists is not supported yet.

Added Scheduler.php class.
Added unit tests for Scheduler.

Updated install & upgrade file with new table structure.

Removed a lot of old defunct unit test stuff from storageServer /var/tests dir.
This commit is contained in:
paul.baranowski 2010-09-21 16:32:04 -04:00
parent 582969915c
commit f4d260b02d
25 changed files with 292 additions and 623 deletions

View file

@ -371,11 +371,18 @@ if (!camp_db_table_exists($CC_CONFIG['transTable'])) {
if (!camp_db_table_exists($CC_CONFIG['scheduleTable'])) {
echo " * Creating database table ".$CC_CONFIG['scheduleTable']."...";
$sql = "CREATE TABLE ".$CC_CONFIG['scheduleTable']."("
." id BIGINT NOT NULL,"
." playlist BIGINT NOT NULL,"
." starts TIMESTAMP NOT NULL,"
." ends TIMESTAMP NOT NULL,"
." PRIMARY KEY(id))";
." id bigint NOT NULL,"
." playlist_id integer NOT NULL,"
." starts timestamp without time zone NOT NULL,"
." ends timestamp without time zone NOT NULL,"
." group_id integer,"
." file_id integer,"
." fade_in time without time zone DEFAULT '00:00:00'::time without time zone,"
." fade_out time without time zone DEFAULT '00:00:00'::time without time zone,"
." cue_in time without time zone DEFAULT '00:00:00'::time without time zone,"
." cue_out time without time zone DEFAULT '00:00:00'::time without time zone,"
." CONSTRAINT cc_schedule_pkey PRIMARY KEY (id),"
." CONSTRAINT unique_id UNIQUE (id))";
camp_install_query($sql);
} else {
echo " * Skipping: database table already exists: ".$CC_CONFIG['scheduleTable']."\n";