IM-733 Create Development timetable for Airtime Development
IM-777 Database structure for new History Feature
This commit is contained in:
parent
163b4a0aa5
commit
328c1f3cac
51 changed files with 15531 additions and 0 deletions
|
@ -479,4 +479,52 @@
|
|||
<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_tag" phpName="CcTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="tag_name" phpName="DbTagName" type="VARCHAR" size="128" required="true" />
|
||||
</table>
|
||||
<table name="cc_file_tag" phpName="CcFileTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" required="true" />
|
||||
<column name="tag_id" phpName="DbTagId" type="INTEGER" required="true" />
|
||||
<foreign-key foreignTable="cc_files" name="cc_file_tag_file_fkey" onDelete="CASCADE">
|
||||
<reference local="file_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_tag" name="c_file_tag_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="tag_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playout_history" phpName="CcPlayoutHistory">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" required="false" />
|
||||
<column name="starts" phpName="DbStarts" type="TIMESTAMP" required="true"/>
|
||||
<column name="ends" phpName="DbEnds" type="TIMESTAMP" required="true"/>
|
||||
<foreign-key foreignTable="cc_files" name="cc_playout_history_file_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="file_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playout_history_metadata" phpName="CcPlayoutHistoryMetaData">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="history_id" phpName="DbHistoryId" type="INTEGER" required="true" />
|
||||
<column name="key" phpName="DbKey" type="VARCHAR" size="128" required="true" />
|
||||
<column name="value" phpName="DbValue" type="VARCHAR" size="128" required="true" />
|
||||
<foreign-key foreignTable="cc_playout_history" name="cc_playout_history_metadata_entry_fkey" onDelete="CASCADE">
|
||||
<reference local="history_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playout_history_template" phpName="CcPlayoutHistoryTemplate">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="template_name" phpName="DbTemplateName" type="VARCHAR" size="128" required="true" />
|
||||
</table>
|
||||
<table name="cc_playout_history_template_tag" phpName="CcPlayoutHistoryTemplateTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="template_id" phpName="DbTemplateId" type="INTEGER" required="true" />
|
||||
<column name="tag_id" phpName="DbTagId" type="INTEGER" required="true" />
|
||||
<foreign-key foreignTable="cc_playout_history_template" name="cc_playout_history_template_template_fkey" onDelete="CASCADE">
|
||||
<reference local="template_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_tag" name="cc_playout_history_template_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="tag_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
</database>
|
||||
|
|
|
@ -752,6 +752,120 @@ CREATE TABLE "cc_locale"
|
|||
COMMENT ON TABLE "cc_locale" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_tag
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_tag" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_tag"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"tag_name" VARCHAR(128) NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_tag" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_file_tag
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_file_tag" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_file_tag"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"file_id" INTEGER NOT NULL,
|
||||
"tag_id" INTEGER NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_file_tag" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playout_history" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playout_history"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"file_id" INTEGER,
|
||||
"starts" TIMESTAMP NOT NULL,
|
||||
"ends" TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playout_history" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history_metadata
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playout_history_metadata" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playout_history_metadata"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"history_id" INTEGER NOT NULL,
|
||||
"key" VARCHAR(128) NOT NULL,
|
||||
"value" VARCHAR(128) NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playout_history_metadata" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history_template
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playout_history_template" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playout_history_template"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"template_name" VARCHAR(128) NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playout_history_template" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history_template_tag
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playout_history_template_tag" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playout_history_template_tag"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"template_id" INTEGER NOT NULL,
|
||||
"tag_id" INTEGER NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playout_history_template_tag" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
ALTER TABLE "cc_files" ADD CONSTRAINT "cc_files_owner_fkey" FOREIGN KEY ("owner_id") REFERENCES "cc_subjs" ("id");
|
||||
|
||||
|
@ -808,3 +922,15 @@ ALTER TABLE "cc_webstream_metadata" ADD CONSTRAINT "cc_schedule_inst_fkey" FOREI
|
|||
ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_timestamp_inst_fkey" FOREIGN KEY ("timestamp_id") REFERENCES "cc_timestamp" ("id") ON DELETE CASCADE;
|
||||
|
||||
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_file_tag" ADD CONSTRAINT "cc_file_tag_file_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_file_tag" ADD CONSTRAINT "c_file_tag_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE;
|
||||
|
||||
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_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_tag" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue