CC-4961: Show linking
-modified db
This commit is contained in:
parent
cfee74693b
commit
76bfce21b1
27 changed files with 550 additions and 816 deletions
|
@ -341,7 +341,7 @@
|
|||
<foreign-key foreignTable="cc_webstream" name="cc_show_stream_fkey" onDelete="CASCADE">
|
||||
<reference local="stream_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<!-- <foreign-key foreignTable="cc_show_stamp" name="cc_schedule_stamp_id_fkey" onDelete="CASCADE">
|
||||
<!-- <foreign-key foreignTable="cc_stamp" name="cc_schedule_stamp_id_fkey" onDelete="CASCADE">
|
||||
<reference local="stamp_id" foreign="id" />
|
||||
</foreign-key> -->
|
||||
<index name="cc_schedule_instance_id_idx">
|
||||
|
@ -477,10 +477,9 @@
|
|||
<column name="locale_code" phpName="DbLocaleCode" type="VARCHAR" size="16" required="true" />
|
||||
<column name="locale_lang" phpName="DbLocaleLang" type="VARCHAR" size="128" required="true" />
|
||||
</table>
|
||||
<table name="cc_show_stamp" phpName="CcShowStamp">
|
||||
<table name="cc_stamp_contents" phpName="CcStampContents">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="show_id" phpName="DbShowId" type="INTEGER" required="true" />
|
||||
<column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="false" />
|
||||
<column name="stamp_id" phpName="DbStampId" type="INTEGER" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" required="false" />
|
||||
<column name="stream_id" phpName="DbStreamId" type="INTEGER" required="false" />
|
||||
<column name="block_id" phpName="DbBlockId" type="INTEGER" required="false" />
|
||||
|
@ -491,23 +490,31 @@
|
|||
<column name="cue_out" phpName="DbCueOut" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
<column name="fade_in" phpName="DbFadeIn" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
<column name="fade_out" phpName="DbFadeOut" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
<foreign-key foreignTable="cc_show" name="cc_show_stamp_show_id_fkey" onDelete="CASCADE">
|
||||
<reference local="show_id" foreign="id" />
|
||||
<foreign-key foreignTable="cc_stamp" name="cc_stamp_contents_stamp_id_fkey" onDelete="CASCADE">
|
||||
<reference local="stamp_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_show_instances" name="cc_show_stamp_instance_id_fkey" onDelete="CASCADE">
|
||||
<reference local="instance_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_files" name="cc_show_stamp_file_id_fkey" onDelete="CASCADE">
|
||||
<foreign-key foreignTable="cc_files" name="cc_stamp_contents_file_id_fkey" onDelete="CASCADE">
|
||||
<reference local="file_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_webstream" name="cc_show_stamp_stream_id_fkey" onDelete="CASCADE">
|
||||
<foreign-key foreignTable="cc_webstream" name="cc_stamp_contents_stream_id_fkey" onDelete="CASCADE">
|
||||
<reference local="stream_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_block" name="cc_show_stamp_block_id_fkey" onDelete="CASCADE">
|
||||
<foreign-key foreignTable="cc_block" name="cc_stamp_contents_block_id_fkey" onDelete="CASCADE">
|
||||
<reference local="block_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_playlist" name="cc_show_stamp_playlist_id_fkey" onDelete="CASCADE">
|
||||
<foreign-key foreignTable="cc_playlist" name="cc_stamp_contents_playlist_id_fkey" onDelete="CASCADE">
|
||||
<reference local="playlist_id" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_stamp" phpName="CcStamp">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="show_id" phpName="DbShowId" type="INTEGER" required="true" />
|
||||
<column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="false" />
|
||||
<foreign-key foreignTable="cc_show" name="cc_stamp_show_id_fkey" onDelete="CASCADE">
|
||||
<reference local="show_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_show_instances" name="cc_stamp_instance_id_fkey" onDelete="CASCADE">
|
||||
<reference local="instance_id" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
</database>
|
||||
|
|
|
@ -751,17 +751,16 @@ COMMENT ON TABLE "cc_locale" IS '';
|
|||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_show_stamp
|
||||
-- cc_stamp_contents
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_show_stamp" CASCADE;
|
||||
DROP TABLE "cc_stamp_contents" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_show_stamp"
|
||||
CREATE TABLE "cc_stamp_contents"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"show_id" INTEGER NOT NULL,
|
||||
"instance_id" INTEGER,
|
||||
"stamp_id" INTEGER NOT NULL,
|
||||
"file_id" INTEGER,
|
||||
"stream_id" INTEGER,
|
||||
"block_id" INTEGER,
|
||||
|
@ -775,7 +774,26 @@ CREATE TABLE "cc_show_stamp"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_show_stamp" IS '';
|
||||
COMMENT ON TABLE "cc_stamp_contents" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_stamp
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_stamp" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_stamp"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"show_id" INTEGER NOT NULL,
|
||||
"instance_id" INTEGER,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_stamp" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
|
@ -835,14 +853,16 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_timestamp_inst_fkey" FOREIGN
|
|||
|
||||
ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN KEY ("mount_name_id") REFERENCES "cc_mount_name" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_show_id_fkey" FOREIGN KEY ("show_id") REFERENCES "cc_show" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp_contents" ADD CONSTRAINT "cc_stamp_contents_stamp_id_fkey" FOREIGN KEY ("stamp_id") REFERENCES "cc_stamp" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_instance_id_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp_contents" ADD CONSTRAINT "cc_stamp_contents_file_id_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_file_id_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp_contents" ADD CONSTRAINT "cc_stamp_contents_stream_id_fkey" FOREIGN KEY ("stream_id") REFERENCES "cc_webstream" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_stream_id_fkey" FOREIGN KEY ("stream_id") REFERENCES "cc_webstream" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp_contents" ADD CONSTRAINT "cc_stamp_contents_block_id_fkey" FOREIGN KEY ("block_id") REFERENCES "cc_block" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_block_id_fkey" FOREIGN KEY ("block_id") REFERENCES "cc_block" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp_contents" ADD CONSTRAINT "cc_stamp_contents_playlist_id_fkey" FOREIGN KEY ("playlist_id") REFERENCES "cc_playlist" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_show_stamp" ADD CONSTRAINT "cc_show_stamp_playlist_id_fkey" FOREIGN KEY ("playlist_id") REFERENCES "cc_playlist" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_stamp" ADD CONSTRAINT "cc_stamp_show_id_fkey" FOREIGN KEY ("show_id") REFERENCES "cc_show" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_stamp" ADD CONSTRAINT "cc_stamp_instance_id_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue