CC-5896: Store cloud files in separate table, inherited from cc_files
Added delete on cascade for cloud files
This commit is contained in:
parent
f6aa2e5a3b
commit
6fa7ddba9a
6 changed files with 12 additions and 9 deletions
|
@ -103,7 +103,7 @@
|
|||
<column name="id" phpName="DbId" required="true" primaryKey="true" autoIncrement="true" type="INTEGER"/>
|
||||
<column name="resource_id" phpName="ResourceId" type="LONGVARCHAR" required="true"/>
|
||||
<column name="cc_file_id" type="INTEGER"/>
|
||||
<foreign-key foreignTable="cc_files">
|
||||
<foreign-key foreignTable="cc_files" onDelete="CASCADE">
|
||||
<reference local="cc_file_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<behavior name="delegate">
|
||||
|
|
|
@ -694,7 +694,8 @@ ALTER TABLE "cc_files" ADD CONSTRAINT "cc_music_dirs_folder_fkey"
|
|||
|
||||
ALTER TABLE "cloud_file" ADD CONSTRAINT "cloud_file_FK_1"
|
||||
FOREIGN KEY ("cc_file_id")
|
||||
REFERENCES "cc_files" ("id");
|
||||
REFERENCES "cc_files" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_perms" ADD CONSTRAINT "cc_perms_subj_fkey"
|
||||
FOREIGN KEY ("subj")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue