· 8 years ago · May 02, 2018, 07:44 PM
1-- phpMyAdmin SQL Dump
2-- version 4.4.14
3-- http://www.phpmyadmin.net
4--
5-- Host: 127.0.0.1
6-- Generation Time: Jul 31, 2017 at 11:59 PM
7-- Server version: 5.6.26
8-- PHP Version: 5.6.12
9
10SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8mb4 */;
18
19-- --------------------------------------------------------
20
21--
22-- Table structure for table `TABLE_ACCOUNTS`
23--
24
25CREATE TABLE IF NOT EXISTS `TABLE_ACCOUNTS` (
26 `id` int(11) NOT NULL,
27 `user_id` int(11) NOT NULL,
28 `instagram_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
29 `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
30 `password` text COLLATE utf8_unicode_ci NOT NULL,
31 `proxy` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
32 `date` datetime NOT NULL,
33 `last_login` datetime NOT NULL,
34 `login_required` tinyint(1) NOT NULL
35) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
36
37-- --------------------------------------------------------
38
39--
40-- Table structure for table `TABLE_CAPTIONS`
41--
42
43CREATE TABLE IF NOT EXISTS `TABLE_CAPTIONS` (
44 `id` int(11) NOT NULL,
45 `user_id` int(11) NOT NULL,
46 `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
47 `caption` text COLLATE utf8_unicode_ci NOT NULL,
48 `date` datetime NOT NULL
49) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
50
51-- --------------------------------------------------------
52
53--
54-- Table structure for table `TABLE_FILES`
55--
56
57CREATE TABLE IF NOT EXISTS `TABLE_FILES` (
58 `id` int(11) NOT NULL,
59 `user_id` int(11) NOT NULL,
60 `title` text COLLATE utf8_unicode_ci NOT NULL,
61 `info` text COLLATE utf8_unicode_ci NOT NULL,
62 `filename` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
63 `filesize` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
64 `date` datetime NOT NULL
65) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
66
67-- --------------------------------------------------------
68
69--
70-- Table structure for table `TABLE_GENERAL_DATA`
71--
72
73CREATE TABLE IF NOT EXISTS `TABLE_GENERAL_DATA` (
74 `id` int(11) NOT NULL,
75 `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
76 `data` text COLLATE utf8_unicode_ci NOT NULL
77) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
78
79--
80-- Dumping data for table `TABLE_GENERAL_DATA`
81--
82
83INSERT INTO `TABLE_GENERAL_DATA` (`id`, `name`, `data`) VALUES
84(1, 'settings', '{"site_name":"Nextpost","site_description":"Nextpost - Auto Post, Schedule & Manage your Instagram Multi Account","site_keywords":"nextpost, instagram, auto post, schedule, multiple accounts, social media","currency":"USD","proxy":true,"user_proxy":true,"geonamesorg_username":"","logomark":"","logotype":""}'),
85(2, 'integrations', '{"dropbox":{"api_key":""},"google":{"api_key":"","client_id":"","analytics":{"property_id":""}},"onedrive":{"client_id":""},"paypal":{"client_id":"","client_secret":"","environment":"sandbox"},"stripe":{"environment":"sandbox","publishable_key":"","secret_key":""},"facebook":{"app_id":"","app_secret":""}}'),
86(3, 'free-trial', '{"size":7,"storage":{"total":"100.00","file":-1},"max_accounts":1,"file_pickers":{"dropbox":true,"onedrive":true,"google_drive":true},"post_types":{"timeline_photo":true,"timeline_video":true,"story_photo":true,"story_video":true,"album_photo":true,"album_video":true},"spintax":true,"modules":[]}'),
87(4, 'email-settings', '{"smtp":{"host":"","port":"","encryption":"","auth":true,"username":"","password":"","from":""},"notifications":{"emails":"","new_user":true,"new_payment":true}}');
88
89-- --------------------------------------------------------
90
91--
92-- Table structure for table `TABLE_ORDERS`
93--
94
95CREATE TABLE IF NOT EXISTS `TABLE_ORDERS` (
96 `id` int(11) NOT NULL,
97 `user_id` int(11) NOT NULL,
98 `data` text COLLATE utf8_unicode_ci NOT NULL,
99 `status` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
100 `payment_gateway` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
101 `payment_id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
102 `total` double(10,2) NOT NULL,
103 `paid` double(10,2) NOT NULL,
104 `currency` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
105 `date` datetime NOT NULL
106) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
107
108-- --------------------------------------------------------
109
110--
111-- Table structure for table `TABLE_PACKAGES`
112--
113
114CREATE TABLE IF NOT EXISTS `TABLE_PACKAGES` (
115 `id` int(11) NOT NULL,
116 `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
117 `monthly_price` double(10,2) NOT NULL,
118 `annual_price` float(10,2) NOT NULL,
119 `settings` text COLLATE utf8_unicode_ci NOT NULL,
120 `is_public` tinyint(1) NOT NULL,
121 `date` datetime NOT NULL
122) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
123
124--
125-- Dumping data for table `TABLE_PACKAGES`
126--
127
128INSERT INTO `TABLE_PACKAGES` (`id`, `title`, `monthly_price`, `annual_price`, `settings`, `is_public`, `date`) VALUES
129(1, 'Alpha', 4.99, 49.00, '{"storage":{"total":"150.00","file":"15.00"},"max_accounts":1,"file_pickers":{"dropbox":false,"onedrive":false,"google_drive":false},"post_types":{"timeline_photo":true,"timeline_video":false,"story_photo":true,"story_video":false,"album_photo":true,"album_video":false},"spintax":false}', 1, '2017-03-18 19:22:44'),
130(2, 'Beta Pack', 7.99, 79.00, '{"storage":{"total":"250","file":"30.00"},"max_accounts":3,"file_pickers":{"dropbox":true,"onedrive":true,"google_drive":true},"post_types":{"timeline_photo":true,"timeline_video":true,"story_photo":true,"story_video":true,"album_photo":true,"album_video":true},"spintax":true,"modules":[]}', 1, '2017-03-18 19:29:19'),
131(3, 'Gamma Pack', 17.99, 165.79, '{"storage":{"total":"300.00","file":"50.00"},"max_accounts":-1,"file_pickers":{"dropbox":true,"onedrive":true,"google_drive":true},"post_types":{"timeline_photo":true,"timeline_video":true,"story_photo":true,"story_video":true,"album_photo":true,"album_video":true},"spintax":true}', 1, '2017-03-18 19:29:43');
132
133-- --------------------------------------------------------
134
135--
136-- Table structure for table `TABLE_PLUGINS`
137--
138
139CREATE TABLE IF NOT EXISTS `TABLE_PLUGINS` (
140 `id` int(11) NOT NULL,
141 `idname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
142 `is_active` tinyint(1) NOT NULL
143) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
144
145-- --------------------------------------------------------
146
147--
148-- Table structure for table `TABLE_POSTS`
149--
150
151CREATE TABLE IF NOT EXISTS `TABLE_POSTS` (
152 `id` int(11) NOT NULL,
153 `status` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
154 `user_id` int(11) NOT NULL,
155 `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
156 `caption` text COLLATE utf8_unicode_ci NOT NULL,
157 `media_ids` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
158 `account_id` int(11) NOT NULL,
159 `is_scheduled` tinyint(1) NOT NULL,
160 `create_date` datetime NOT NULL,
161 `schedule_date` datetime NOT NULL,
162 `publish_date` datetime NOT NULL,
163 `is_hidden` tinyint(1) NOT NULL,
164 `data` text COLLATE utf8_unicode_ci NOT NULL
165) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
166
167-- --------------------------------------------------------
168
169--
170-- Table structure for table `TABLE_PROXIES`
171--
172
173CREATE TABLE IF NOT EXISTS `TABLE_PROXIES` (
174 `id` int(11) NOT NULL,
175 `proxy` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
176 `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
177 `use_count` int(11) NOT NULL
178) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
179
180-- --------------------------------------------------------
181
182--
183-- Table structure for table `TABLE_USERS`
184--
185
186CREATE TABLE IF NOT EXISTS `TABLE_USERS` (
187 `id` int(11) NOT NULL,
188 `account_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
189 `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
190 `username` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
191 `password` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
192 `firstname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
193 `lastname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
194 `package_id` int(11) NOT NULL,
195 `package_subscription` tinyint(1) NOT NULL,
196 `settings` text COLLATE utf8_unicode_ci NOT NULL,
197 `preferences` text COLLATE utf8_unicode_ci NOT NULL,
198 `is_active` int(11) NOT NULL,
199 `expire_date` datetime NOT NULL,
200 `date` datetime NOT NULL,
201 `data` text COLLATE utf8_unicode_ci NOT NULL
202) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
203
204--
205-- Dumping data for table `TABLE_USERS`
206--
207
208INSERT INTO `TABLE_USERS` (`id`, `account_type`, `email`, `username`, `password`, `firstname`, `lastname`, `package_id`, `package_subscription`, `settings`, `preferences`, `is_active`, `expire_date`, `date`, `data`) VALUES
209(1, 'admin', 'ADMIN_EMAIL', 'admin', 'ADMIN_PASSWORD', 'ADMIN_FIRSTNAME', 'ADMIN_LASTNAME', 3, 1, '{"storage":{"total":"300.00","file":"50.00"},"max_accounts":-1,"file_pickers":{"dropbox":true,"onedrive":true,"google_drive":true},"post_types":{"timeline_photo":true,"timeline_video":true,"story_photo":true,"story_video":true,"album_photo":true,"album_video":true},"spintax":true}', '{"timezone":"ADMIN_TIMEZONE","dateformat":"Y-m-d","timeformat":"24","language":"en-US"}', 1, '2030-12-31 23:59:59', 'ADMIN_DATE', '{}');
210
211--
212-- Indexes for dumped tables
213--
214
215--
216-- Indexes for table `TABLE_ACCOUNTS`
217--
218ALTER TABLE `TABLE_ACCOUNTS`
219 ADD PRIMARY KEY (`id`),
220 ADD UNIQUE KEY `user_id_2` (`user_id`,`username`),
221 ADD KEY `user_id` (`user_id`);
222
223--
224-- Indexes for table `TABLE_CAPTIONS`
225--
226ALTER TABLE `TABLE_CAPTIONS`
227 ADD PRIMARY KEY (`id`),
228 ADD KEY `user_id` (`user_id`);
229
230--
231-- Indexes for table `TABLE_FILES`
232--
233ALTER TABLE `TABLE_FILES`
234 ADD PRIMARY KEY (`id`);
235
236--
237-- Indexes for table `TABLE_GENERAL_DATA`
238--
239ALTER TABLE `TABLE_GENERAL_DATA`
240 ADD PRIMARY KEY (`id`),
241 ADD UNIQUE KEY `name` (`name`);
242
243--
244-- Indexes for table `TABLE_ORDERS`
245--
246ALTER TABLE `TABLE_ORDERS`
247 ADD PRIMARY KEY (`id`);
248
249--
250-- Indexes for table `TABLE_PACKAGES`
251--
252ALTER TABLE `TABLE_PACKAGES`
253 ADD PRIMARY KEY (`id`);
254
255--
256-- Indexes for table `TABLE_PLUGINS`
257--
258ALTER TABLE `TABLE_PLUGINS`
259 ADD PRIMARY KEY (`id`),
260 ADD UNIQUE KEY `idname` (`idname`);
261
262--
263-- Indexes for table `TABLE_POSTS`
264--
265ALTER TABLE `TABLE_POSTS`
266 ADD PRIMARY KEY (`id`),
267 ADD KEY `user_id` (`user_id`),
268 ADD KEY `status` (`status`),
269 ADD KEY `account_id` (`account_id`);
270
271--
272-- Indexes for table `TABLE_PROXIES`
273--
274ALTER TABLE `TABLE_PROXIES`
275 ADD PRIMARY KEY (`id`);
276
277--
278-- Indexes for table `TABLE_USERS`
279--
280ALTER TABLE `TABLE_USERS`
281 ADD PRIMARY KEY (`id`),
282 ADD UNIQUE KEY `email` (`email`);
283
284--
285-- AUTO_INCREMENT for dumped tables
286--
287
288--
289-- AUTO_INCREMENT for table `TABLE_ACCOUNTS`
290--
291ALTER TABLE `TABLE_ACCOUNTS`
292 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
293--
294-- AUTO_INCREMENT for table `TABLE_CAPTIONS`
295--
296ALTER TABLE `TABLE_CAPTIONS`
297 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
298--
299-- AUTO_INCREMENT for table `TABLE_FILES`
300--
301ALTER TABLE `TABLE_FILES`
302 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
303--
304-- AUTO_INCREMENT for table `TABLE_GENERAL_DATA`
305--
306ALTER TABLE `TABLE_GENERAL_DATA`
307 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
308--
309-- AUTO_INCREMENT for table `TABLE_ORDERS`
310--
311ALTER TABLE `TABLE_ORDERS`
312 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
313--
314-- AUTO_INCREMENT for table `TABLE_PACKAGES`
315--
316ALTER TABLE `TABLE_PACKAGES`
317 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
318--
319-- AUTO_INCREMENT for table `TABLE_PLUGINS`
320--
321ALTER TABLE `TABLE_PLUGINS`
322 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
323--
324-- AUTO_INCREMENT for table `TABLE_POSTS`
325--
326ALTER TABLE `TABLE_POSTS`
327 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
328--
329-- AUTO_INCREMENT for table `TABLE_PROXIES`
330--
331ALTER TABLE `TABLE_PROXIES`
332 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
333--
334-- AUTO_INCREMENT for table `TABLE_USERS`
335--
336ALTER TABLE `TABLE_USERS`
337 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
338--
339-- Constraints for dumped tables
340--
341
342--
343-- Constraints for table `TABLE_ACCOUNTS`
344--
345ALTER TABLE `TABLE_ACCOUNTS`
346 ADD CONSTRAINT `accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `TABLE_USERS` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
347--
348-- Constraints for table `TABLE_CAPTIONS`
349--
350ALTER TABLE `TABLE_CAPTIONS`
351 ADD CONSTRAINT `captions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `TABLE_USERS` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
352
353--
354-- Constraints for table `TABLE_POSTS`
355--
356ALTER TABLE `TABLE_POSTS`
357 ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `TABLE_USERS` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
358 ADD CONSTRAINT `posts_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `TABLE_ACCOUNTS` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
359
360/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
361/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
362/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;