Fixed a bug in which placeholder next ids in the note_current table weren't getting reaped.
This commit is contained in:
parent
00b5a8ad81
commit
a580e1759d
|
@ -64,6 +64,15 @@ where
|
|||
note_current.revision < now() - interval '1 day'
|
||||
);
|
||||
|
||||
delete from
|
||||
note_current
|
||||
where (
|
||||
notebook_id is null or notebook_id not in
|
||||
( select notebook_id from notebook_current )
|
||||
)
|
||||
and
|
||||
note_current.revision < now() - interval '1 day';
|
||||
|
||||
-- Delete unused file next ids and files whose notebooks or notes no longer exist.
|
||||
delete from
|
||||
file
|
||||
|
|
Reference in New Issue