-
Notifications
You must be signed in to change notification settings - Fork 0
/
testdb.sqlite
43 lines (38 loc) · 1.73 KB
/
testdb.sqlite
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
CREATE TABLE IF NOT EXISTS `virtual_domains` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `virtual_users` (
`id` int(11) NOT NULL,
`domain_id` int(11) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(150) NOT NULL,
`quota` bigint(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE (`email`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS `virtual_aliases` (
`id` int(11) NOT NULL,
`domain_id` int(11) NOT NULL,
`source` varchar(100) NOT NULL,
`destination` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
);
REPLACE INTO virtual_domains (id,name)
VALUES ('1','example.org'),
('2','example.com'),
('3','example.net');
REPLACE INTO virtual_users (id,domain_id,password,email,quota)
VALUES ('1', '1', '{BLF-CRYPT}$2y$05$.WedBCNZiwxY1CG3aleIleu6lYjup2CIg0BP4M4YCZsO204Czz07W', 'john@example.org', 0),
('2', '2', '{BLF-CRYPT}$2y$05$.WedBCNZiwxY1CG3aleIleu6lYjup2CIg0BP4M4YCZsO204Czz07W', 'alice@example.com', 1000000),
('3', '3', '{BLF-CRYPT}$2y$05$.WedBCNZiwxY1CG3aleIleu6lYjup2CIg0BP4M4YCZsO204Czz07W', 'bob@example.net', 250000000),
('4', '3', '{BLF-CRYPT}$2y$05$.WedBCNZiwxY1CG3aleIleu6lYjup2CIg0BP4M4YCZsO204Czz07W', 'dean@example.net', 5000000000);
REPLACE INTO virtual_aliases (id,domain_id,source,destination)
VALUES ('1', '1', 'jack@example.org', 'john@example.org'),
('2', '1', 'jack@example.org', 'alice@example.com'),
('3', '3', 'root@example.net', 'bob@example.net'),
('4', '3', 'staff@example.net', 'bob@example.net'),
('5', '1', 'jack@example.org', 'jack@gmail.com');