-
Notifications
You must be signed in to change notification settings - Fork 573
Expand file tree
/
Copy pathinitialize_schema_v1.sql
More file actions
92 lines (78 loc) · 1.72 KB
/
initialize_schema_v1.sql
File metadata and controls
92 lines (78 loc) · 1.72 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
CREATE TABLE `inbox` (
`msgid` blob,
`toaddress` text,
`fromaddress` text,
`subject` text,
`received` text,
`message` text,
`folder` text,
`encodingtype` int,
`read` bool,
UNIQUE(msgid) ON CONFLICT REPLACE
);
CREATE TABLE `sent` (
`msgid` blob,
`toaddress` text,
`toripe` blob,
`fromaddress` text,
`subject` text,
`message` text,
`ackdata` blob,
`lastactiontime` integer,
`status` text,
`pubkeyretrynumber` integer,
`msgretrynumber` integer,
`folder` text,
`encodingtype` int
);
CREATE TABLE `subscriptions` (
`label` text,
`address` text,
`enabled` bool
);
CREATE TABLE `addressbook` (
`label` text,
`address` text
);
CREATE TABLE `blacklist` (
`label` text,
`address` text,
`enabled` bool
);
CREATE TABLE `whitelist` (
`label` text,
`address` text,
`enabled` bool
);
CREATE TABLE `pubkeys` (
`hash` blob,
`transmitdata` blob,
`time` int,
`usedpersonally` text,
UNIQUE(hash) ON CONFLICT REPLACE
);
CREATE TABLE `inventory` (
`hash` blob,
`objecttype` text,
`streamnumber` int,
`payload` blob,
`receivedtime` integer,
UNIQUE(hash) ON CONFLICT REPLACE
);
CREATE TABLE `knownnodes` (
`timelastseen` int,
`stream` int,
`services` blob,
`host` blob,
`port` blob,
UNIQUE(host, stream, port) ON CONFLICT REPLACE
);
CREATE TABLE `settings` (
`key` blob,
`value` blob,
UNIQUE(key) ON CONFLICT REPLACE
);
INSERT INTO subscriptions VALUES ('Bitmessage new releases/announcements', 'BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw', 1);
INSERT INTO settings VALUES('version', 1);
INSERT INTO settings VALUES('lastvacuumtime', CAST(strftime('%s', 'now') AS STR) );
INSERT INTO inventory VALUES( '', 'pubkey', 1, '', 1);