-
Notifications
You must be signed in to change notification settings - Fork 1
/
cme.sql
233 lines (192 loc) · 8.01 KB
/
cme.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.50-community - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.1.0.4867
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!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' */;
-- Dumping database structure for cme
CREATE DATABASE IF NOT EXISTS `cme` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `cme`;
-- Dumping structure for table cme.bounces
CREATE TABLE IF NOT EXISTS `bounces` (
`email` varchar(200) NOT NULL,
`campaign_id` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
PRIMARY KEY (`email`),
KEY `campaign_id` (`campaign_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.brands
CREATE TABLE IF NOT EXISTS `brands` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`brand_name` varchar(225) NOT NULL DEFAULT '0',
`brand_sender_email` varchar(225) NOT NULL DEFAULT '0',
`brand_sender_name` varchar(225) NOT NULL DEFAULT '0',
`brand_website_url` varchar(225) NOT NULL DEFAULT '0',
`brand_domain_name` varchar(225) NOT NULL DEFAULT '0',
`brand_unsubscribe_url` varchar(225) NOT NULL DEFAULT '0',
`brand_logo` varchar(225) NOT NULL DEFAULT '0',
`brand_created` int(11) NOT NULL DEFAULT '0',
`brand_deleted_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.campaigns
CREATE TABLE IF NOT EXISTS `campaigns` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subject` varchar(500) NOT NULL,
`from` varchar(225) NOT NULL,
`html_content` text,
`text_content` text,
`list_id` int(11) NOT NULL DEFAULT '0',
`brand_id` int(11) NOT NULL DEFAULT '0',
`send_time` int(11) DEFAULT NULL,
`send_priority` int(11) NOT NULL DEFAULT '0',
`status` enum('Pending','Queuing','Queued','Sending','Sent','Paused','Aborted') NOT NULL DEFAULT 'Pending',
`type` enum('default','rolling') NOT NULL DEFAULT 'default',
`frequency` int(11) DEFAULT NULL,
`filters` text,
`tested` int(11) NOT NULL DEFAULT '0',
`previewed` int(11) NOT NULL DEFAULT '0',
`smtp_provider_id` int(11) DEFAULT NULL,
`created` int(11) NOT NULL,
`deleted_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.campaign_events
CREATE TABLE IF NOT EXISTS `campaign_events` (
`event_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`campaign_id` int(11) DEFAULT '0',
`list_id` int(11) DEFAULT '0',
`subscriber_id` int(11) DEFAULT '0',
`event_type` enum('queued','failed','sent','opened','bounced','unsubscribed','clicked','test') DEFAULT NULL,
`reference` varchar(500) DEFAULT NULL,
`time` int(11) DEFAULT '0',
PRIMARY KEY (`event_id`),
KEY `campaign_id` (`campaign_id`),
KEY `list_id` (`list_id`),
KEY `subscriber_id` (`subscriber_id`),
KEY `event_type` (`event_type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.campaign_queue
CREATE TABLE IF NOT EXISTS `campaign_queue` (
`id` int(11) DEFAULT NULL,
`campaign_id` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
`locked_by` varchar(225) DEFAULT NULL,
`processed` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Campaign send queue, when a campaign is sent, it queued here';
-- Data exporting was unselected.
-- Dumping structure for table cme.import_queue
CREATE TABLE IF NOT EXISTS `import_queue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`list_id` int(11) NOT NULL DEFAULT '0',
`type` enum('api','csv','file') NOT NULL,
`source` varchar(225) DEFAULT NULL,
`locked_by` varchar(225) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.lists
CREATE TABLE IF NOT EXISTS `lists` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(225) NOT NULL DEFAULT '0',
`description` varchar(225) NOT NULL DEFAULT '0',
`endpoint` varchar(225) DEFAULT NULL,
`refresh_interval` int(11) DEFAULT NULL,
`last_refresh_time` int(11) DEFAULT NULL,
`locked_by` varchar(225) DEFAULT NULL,
`deleted_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.message_queue
CREATE TABLE IF NOT EXISTS `message_queue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subject` varchar(500) NOT NULL,
`from_email` varchar(225) NOT NULL,
`from_name` varchar(225) NOT NULL,
`to` varchar(225) DEFAULT NULL,
`html_content` text NOT NULL,
`text_content` text NOT NULL,
`subscriber_id` int(11) NOT NULL DEFAULT '0',
`list_id` int(11) NOT NULL DEFAULT '0',
`brand_id` int(11) NOT NULL DEFAULT '0',
`campaign_id` int(11) NOT NULL DEFAULT '0',
`status` enum('Pending','Sent','Failed','Paused') NOT NULL DEFAULT 'Pending',
`send_time` int(11) DEFAULT NULL,
`send_priority` int(11) DEFAULT NULL,
`locked_by` varchar(225) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `campaign_id` (`campaign_id`),
KEY `brand_id` (`brand_id`),
KEY `list_id` (`list_id`),
KEY `status` (`status`),
KEY `locked_by` (`locked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
-- Data exporting was unselected.
-- Dumping structure for table cme.migrations
CREATE TABLE IF NOT EXISTS `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Data exporting was unselected.
-- Dumping structure for table cme.ranges
CREATE TABLE IF NOT EXISTS `ranges` (
`list_id` int(11) NOT NULL,
`campaign_id` int(11) NOT NULL,
`start` int(11) NOT NULL,
`end` int(11) DEFAULT NULL,
`locked_by` varchar(225) DEFAULT NULL,
`created` int(11) DEFAULT NULL,
PRIMARY KEY (`list_id`,`campaign_id`,`start`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.smtp_providers
CREATE TABLE IF NOT EXISTS `smtp_providers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) NOT NULL DEFAULT '0',
`host` varchar(250) NOT NULL DEFAULT '0',
`username` varchar(250) NOT NULL DEFAULT '0',
`password` varchar(250) NOT NULL DEFAULT '0',
`port` int(11) NOT NULL DEFAULT '0',
`default` int(11) NOT NULL DEFAULT '0',
`deleted_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.unsubscribes
CREATE TABLE IF NOT EXISTS `unsubscribes` (
`email` varchar(200) NOT NULL,
`brand_id` int(11) DEFAULT NULL,
`campaign_id` int(11) DEFAULT NULL,
`list_id` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
PRIMARY KEY (`email`),
KEY `brand_id` (`brand_id`),
KEY `campaign_id` (`campaign_id`),
KEY `list_id` (`list_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Data exporting was unselected.
-- Dumping structure for table cme.users
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`active` smallint(6) NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;