adding an instance id to the playout history table.

This commit is contained in:
Naomi 2013-08-28 17:15:36 -04:00
parent 5fbc3867f8
commit 5aa983be36
12 changed files with 917 additions and 14 deletions

View file

@ -766,6 +766,7 @@ CREATE TABLE "cc_playout_history"
"file_id" INTEGER,
"starts" TIMESTAMP NOT NULL,
"ends" TIMESTAMP NOT NULL,
"instance_id" INTEGER,
PRIMARY KEY ("id")
);
@ -893,6 +894,8 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN
ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE;
ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE;
ALTER TABLE "cc_playout_history_template_field" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE;