-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-schema.sql
100 lines (75 loc) · 2.88 KB
/
db-schema.sql
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
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: fernet.foser.net (MySQL 5.5.5-10.0.21-MariaDB-1~wheezy-log)
# Database: postmark-box-app
# Generation Time: 2016-11-24 15:34:59 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table app
# ------------------------------------------------------------
DROP TABLE IF EXISTS `app`;
CREATE TABLE `app` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`app_key` char(32) DEFAULT NULL,
`postmark_api_key` varchar(255) DEFAULT NULL,
`email_pattern` varchar(255) DEFAULT NULL,
`msg_body_template` longtext,
`msg_subject_template` text,
PRIMARY KEY (`id`),
UNIQUE KEY `app_key` (`app_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table box
# ------------------------------------------------------------
DROP TABLE IF EXISTS `box`;
CREATE TABLE `box` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`hash` char(32) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`msg_count` int(11) DEFAULT '0',
`last_sent_at` datetime DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `hash` (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table error
# ------------------------------------------------------------
DROP TABLE IF EXISTS `error`;
CREATE TABLE `error` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`error` longtext NOT NULL,
`request` longtext NOT NULL,
`response` longtext NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table message
# ------------------------------------------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`sender` varchar(255) DEFAULT NULL,
`receiver` varchar(255) DEFAULT NULL,
`body` longtext,
`raw_body` longtext,
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;