CC-5450 : Refactor Media Management (Classes/DB) in Airtime
fixing an import, adding some indexes to the database.
This commit is contained in:
parent
594e8df606
commit
4ddbb82e4a
|
@ -8,6 +8,7 @@ use Airtime\PlayoutHistory\CcPlayoutHistoryTemplate;
|
|||
use Airtime\PlayoutHistory\CcPlayoutHistoryTemplatePeer;
|
||||
use Airtime\PlayoutHistory\CcPlayoutHistoryTemplateQuery;
|
||||
use Airtime\PlayoutHistory\CcPlayoutHistoryTemplateField;
|
||||
use Airtime\PlayoutHistory\CcPlayoutHistoryTemplateFieldPeer;
|
||||
|
||||
use Airtime\CcShowHostsQuery;
|
||||
use Airtime\CcScheduleQuery;
|
||||
|
|
|
@ -246,6 +246,9 @@
|
|||
<foreign-key foreignTable="cc_playout_history" name="cc_playout_history_metadata_entry_fkey" onDelete="CASCADE">
|
||||
<reference local="history_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<index name="playout_history_metadata_idx">
|
||||
<index-column name="history_id"/>
|
||||
</index>
|
||||
</table>
|
||||
<table name="cc_playout_history_template" phpName="CcPlayoutHistoryTemplate" namespace="PlayoutHistory">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
|
@ -263,6 +266,9 @@
|
|||
<foreign-key foreignTable="cc_playout_history_template" name="cc_playout_history_template_template_fkey" onDelete="CASCADE">
|
||||
<reference local="template_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<index name="playout_history_template_field_idx">
|
||||
<index-column name="template_id"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="media_item" phpName="MediaItem">
|
||||
|
@ -318,9 +324,6 @@
|
|||
<foreign-key foreignTable="cc_music_dirs" name="audio_file_music_dir_fkey">
|
||||
<reference local="directory" foreign="id"/>
|
||||
</foreign-key>
|
||||
<index name="audio_file_md5_idx">
|
||||
<index-column name="md5"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="media_webstream" phpName="Webstream" namespace="MediaItem">
|
||||
|
@ -355,6 +358,12 @@
|
|||
<foreign-key foreignTable="media_item" name="media_content_media_fkey" onDelete="CASCADE">
|
||||
<reference local="media_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<index name="media_content_playlist_idx">
|
||||
<index-column name="playlist_id"/>
|
||||
</index>
|
||||
<index name="media_content_media_idx">
|
||||
<index-column name="media_id"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
</database>
|
||||
|
|
|
@ -359,6 +359,8 @@ CREATE TABLE "cc_playout_history_metadata"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE INDEX "playout_history_metadata_idx" ON "cc_playout_history_metadata" ("history_id");
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- cc_playout_history_template
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -391,6 +393,8 @@ CREATE TABLE "cc_playout_history_template_field"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE INDEX "playout_history_template_field_i" ON "cc_playout_history_template_field" ("template_id");
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- media_item
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -465,8 +469,6 @@ CREATE TABLE "media_audiofile"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE INDEX "audio_file_md5_idx" ON "media_audiofile" ("md5");
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- media_webstream
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -533,6 +535,10 @@ CREATE TABLE "media_content"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE INDEX "media_content_playlist_idx" ON "media_content" ("playlist_id");
|
||||
|
||||
CREATE INDEX "media_content_media_idx" ON "media_content" ("media_id");
|
||||
|
||||
ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey"
|
||||
FOREIGN KEY ("show_id")
|
||||
REFERENCES "cc_show" ("id")
|
||||
|
|
Loading…
Reference in New Issue