-
Notifications
You must be signed in to change notification settings - Fork 577
Expand file tree
/
Copy pathinitialize_schema.sql
More file actions
100 lines (80 loc) · 1.8 KB
/
initialize_schema.sql
File metadata and controls
100 lines (80 loc) · 1.8 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
CREATE TABLE `inbox` (
`msgid` blob,
`toaddress` text,
`fromaddress` text,
`subject` text,
`received` text,
`message` text,
`folder` text,
`encodingtype` int,
`read` bool,
`sighash` blob,
UNIQUE(msgid) ON CONFLICT REPLACE
) ;
CREATE TABLE `sent` (
`msgid` blob,
`toaddress` text,
`toripe` blob,
`fromaddress` text,
`subject` text,
`message` text,
`ackdata` blob,
`senttime` integer,
`lastactiontime` integer,
`sleeptill` integer,
`status` text,
`retrynumber` integer,
`folder` text,
`encodingtype` int,
`ttl` int
) ;
CREATE TABLE `subscriptions` (
`label` text,
`address` text,
`enabled` bool
) ;
CREATE TABLE `addressbook` (
`label` text,
`address` text,
UNIQUE(address) ON CONFLICT IGNORE
) ;
CREATE TABLE `blacklist` (
`label` text,
`address` text,
`enabled` bool
) ;
CREATE TABLE `whitelist` (
`label` text,
`address` text,
`enabled` bool
) ;
CREATE TABLE `pubkeys` (
`address` text,
`addressversion` int,
`transmitdata` blob,
`time` int,
`usedpersonally` text,
UNIQUE(address) ON CONFLICT REPLACE
) ;
CREATE TABLE `inventory` (
`hash` blob,
`objecttype` int,
`streamnumber` int,
`payload` blob,
`expirestime` integer,
`tag` blob,
UNIQUE(hash) ON CONFLICT REPLACE
) ;
INSERT INTO subscriptions VALUES ('Bitmessage new releases/announcements', 'BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw', 1);
CREATE TABLE `settings` (
`key` blob,
`value` blob,
UNIQUE(key) ON CONFLICT REPLACE
) ;
INSERT INTO settings VALUES('version','11');
INSERT INTO settings VALUES('lastvacuumtime', CAST(strftime('%s', 'now') AS STR) );
CREATE TABLE `objectprocessorqueue` (
`objecttype` int,
`data` blob,
UNIQUE(objecttype, data) ON CONFLICT REPLACE
) ;