Many improvements to the database layer.

- Proper handling of referenced tables deletion.
- Proper handling of storage referenced tables deletion.
- Remove of obsolete tables and triggers.
This commit is contained in:
Andrey Antukh 2021-01-09 12:23:21 +01:00 committed by Alonso Torres
parent d32cacf1da
commit 16469daff3
8 changed files with 72 additions and 7 deletions

View file

@ -0,0 +1,9 @@
ALTER TABLE file_library_rel
DROP CONSTRAINT file_library_rel_library_file_id_fkey,
ADD CONSTRAINT file_library_rel_library_file_id_fkey
FOREIGN KEY (library_file_id) REFERENCES file(id) ON DELETE CASCADE;
ALTER TABLE team_profile_rel
DROP CONSTRAINT team_profile_rel_profile_id_fkey,
ADD CONSTRAINT team_profile_rel_profile_id_fkey
FOREIGN KEY (profile_id) REFERENCES profile(id) ON DELETE CASCADE;