File: version-024.sql

package info (click to toggle)
geary 46.0-10
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 15,092 kB
  • sloc: javascript: 972; ansic: 722; sql: 247; xml: 183; python: 30; makefile: 28; sh: 24
file content (25 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--
-- Add the DeleteAttachmentFile table, which allows for attachment files to be deleted (garbage
-- collected) after all references to them have been removed from the database without worrying
-- about deleting them first and the database transaction failing.
--
-- Also add GarbageCollectionTable, a single-row table holding various information about when
-- GC has occurred and when it should occur next.
--

CREATE TABLE DeleteAttachmentFileTable (
    id INTEGER PRIMARY KEY,
    filename TEXT NOT NULL
);

CREATE TABLE GarbageCollectionTable (
    id INTEGER PRIMARY KEY,
    last_reap_time_t INTEGER DEFAULT NULL,
    last_vacuum_time_t INTEGER DEFAULT NULL,
    reaped_messages_since_last_vacuum INTEGER DEFAULT 0
);

-- Insert a single row with a well-known rowid and default values, this will be the row used
-- by the ImapDB.GC class.
INSERT INTO GarbageCollectionTable (id) VALUES (0);