mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Fix MySQL schema
This commit is contained in:
parent
568e6e4660
commit
f4b08170bf
1 changed files with 4 additions and 3 deletions
|
@ -9,9 +9,10 @@ alter table arsse_sessions default character set utf8mb4 collate utf8mb4_unicode
|
||||||
alter table arsse_sessions convert to character set utf8mb4 collate utf8mb4_unicode_ci;
|
alter table arsse_sessions convert to character set utf8mb4 collate utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- Ensure referential integrity
|
-- Ensure referential integrity
|
||||||
delete from arsse_folders where
|
with valid as (select id from arsse_folders)
|
||||||
owner not in (select id from arsse_users) or
|
delete from arsse_folders where
|
||||||
(parent is not null and parent not in (select id from arsse_folders));
|
owner not in (select id from arsse_users) or
|
||||||
|
(parent is not null and parent not in (select id from valid));
|
||||||
delete from arsse_subscriptions where
|
delete from arsse_subscriptions where
|
||||||
owner not in (select id from arsse_users) or
|
owner not in (select id from arsse_users) or
|
||||||
feed not in (select id from arsse_feeds) or
|
feed not in (select id from arsse_feeds) or
|
||||||
|
|
Loading…
Reference in a new issue