fix cascade delete for user_prefs foreign keys and PG

This commit is contained in:
Andrew Dolgov 2005-11-26 13:36:22 +01:00
parent ef775b46d8
commit 00a0bcc82f
1 changed files with 2 additions and 2 deletions

View File

@ -181,8 +181,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_CATS', 1, 'false', 'Enable feed categories',2); insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_CATS', 1, 'false', 'Enable feed categories',2);
create table ttrss_user_prefs ( create table ttrss_user_prefs (
owner_uid integer not null references ttrss_users(id) on delete cascade, owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
pref_name varchar(250) not null references ttrss_prefs(pref_name), pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,
value text not null); value text not null);
create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid); create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);