SAAS-1058: Podcast table schema
Renamed podcast_contents to podcast_episodes Added new columns to podcast_episodes table
This commit is contained in:
parent
f6f23864ce
commit
9a2e9d1b3b
18 changed files with 889 additions and 637 deletions
|
@ -727,17 +727,19 @@ CREATE TABLE "podcast"
|
|||
);
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- podcast_contents
|
||||
-- podcast_episodes
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS "podcast_contents" CASCADE;
|
||||
DROP TABLE IF EXISTS "podcast_episodes" CASCADE;
|
||||
|
||||
CREATE TABLE "podcast_contents"
|
||||
CREATE TABLE "podcast_episodes"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"file_id" INTEGER NOT NULL,
|
||||
"podcast_id" INTEGER NOT NULL,
|
||||
"publication_date" TIMESTAMP NOT NULL,
|
||||
"download_url" VARCHAR(512) NOT NULL,
|
||||
"episode_guid" VARCHAR(512) NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -918,12 +920,12 @@ ALTER TABLE "podcast" ADD CONSTRAINT "podcast_owner_fkey"
|
|||
REFERENCES "cc_subjs" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "podcast_contents" ADD CONSTRAINT "podcast_contents_cc_files_fkey"
|
||||
ALTER TABLE "podcast_episodes" ADD CONSTRAINT "podcast_episodes_cc_files_fkey"
|
||||
FOREIGN KEY ("file_id")
|
||||
REFERENCES "cc_files" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "podcast_contents" ADD CONSTRAINT "podcast_contents_podcast_id_fkey"
|
||||
ALTER TABLE "podcast_episodes" ADD CONSTRAINT "podcast_episodes_podcast_id_fkey"
|
||||
FOREIGN KEY ("podcast_id")
|
||||
REFERENCES "podcast" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue