CC-84: Smart Playlists
- db inserting into cc_playlistcriteria - error validations
This commit is contained in:
parent
e7e4aa41dd
commit
3bce6b4999
9 changed files with 409 additions and 25 deletions
|
@ -255,7 +255,8 @@
|
|||
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
|
||||
<column name="criteria" phpName="DbCriteria" type="VARCHAR" size="16" required="true"/>
|
||||
<column name="modifier" phpName="DbModifier" type="VARCHAR" size="16" required="true"/>
|
||||
<column name="value" phpName="DbValue" type="VARCHAR" size="16" required="true"/>
|
||||
<column name="value" phpName="DbValue" type="VARCHAR" size="32" required="true"/>
|
||||
<column name="extra" phpName="DbExtra" type="VARCHAR" size="32" required="false"/>
|
||||
<column name="playlist_id" phpName="DbPlaylistId" type="INTEGER" required="true"/>
|
||||
<foreign-key foreignTable="cc_playlist" name="cc_playlistcontents_playlist_id_fkey" onDelete="CASCADE">
|
||||
<reference local="playlist_id" foreign="id"/>
|
||||
|
|
|
@ -301,6 +301,7 @@ CREATE TABLE "cc_playlist"
|
|||
"creator_id" INTEGER,
|
||||
"description" VARCHAR(512),
|
||||
"length" interval default '00:00:00',
|
||||
"type" VARCHAR(7) default 'static',
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -332,6 +333,28 @@ CREATE TABLE "cc_playlistcontents"
|
|||
COMMENT ON TABLE "cc_playlistcontents" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playlistcriteria
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playlistcriteria" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playlistcriteria"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"criteria" VARCHAR(16) NOT NULL,
|
||||
"modifier" VARCHAR(16) NOT NULL,
|
||||
"value" VARCHAR(32) NOT NULL,
|
||||
"extra" VARCHAR(32),
|
||||
"playlist_id" INTEGER NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playlistcriteria" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_pref
|
||||
|
@ -606,6 +629,8 @@ ALTER TABLE "cc_playlistcontents" ADD CONSTRAINT "cc_playlistcontents_file_id_fk
|
|||
|
||||
ALTER TABLE "cc_playlistcontents" ADD CONSTRAINT "cc_playlistcontents_playlist_id_fkey" FOREIGN KEY ("playlist_id") REFERENCES "cc_playlist" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playlistcriteria" ADD CONSTRAINT "cc_playlistcontents_playlist_id_fkey" FOREIGN KEY ("playlist_id") REFERENCES "cc_playlist" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_pref" ADD CONSTRAINT "cc_pref_subjid_fkey" FOREIGN KEY ("subjid") REFERENCES "cc_subjs" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_schedule" ADD CONSTRAINT "cc_show_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue