1 SET FOREIGN_KEY_CHECKS = 0;
3 DROP TABLE IF EXISTS `asst_assets`;
5 CREATE TABLE `asst_assets` (
6 `id` int(11) NOT NULL AUTO_INCREMENT,
7 `user_id` int(11) DEFAULT NULL,
8 `parent_id` int(11) DEFAULT NULL,
10 `settings_id` int(11) DEFAULT NULL,
13 `public_status` bit(1) DEFAULT b'0',
14 `creation_date` int(11) DEFAULT NULL,
15 `modification_date` int(11) DEFAULT '0',
17 KEY `asst_asets_parent_id` (`parent_id`),
18 KEY `asst_assets_user_id` (`user_id`)
19 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
22 DROP TABLE IF EXISTS `asst_licenses`;
24 CREATE TABLE `asst_licenses` (
25 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `description` text NOT NULL,
28 `fulltext` blob NOT NULL,
31 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34 DROP TABLE IF EXISTS `cmrc_products`;
36 CREATE TABLE `cmrc_products` (
37 `id` int(11) NOT NULL AUTO_INCREMENT,
38 `sku` varchar(20) DEFAULT NULL,
39 `title` varchar(100) DEFAULT NULL,
40 `price` decimal(9,2) DEFAULT NULL,
41 `type` varchar(100) DEFAULT NULL,
42 `beneficiary` varchar(50) DEFAULT NULL,
43 `sub_term_seconds` int(11) DEFAULT NULL,
44 `qty_total` int(11) NOT NULL DEFAULT '0',
45 `creation_date` int(11) NOT NULL DEFAULT '0',
46 `modification_date` int(11) DEFAULT NULL,
48 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
51 DROP TABLE IF EXISTS `cmrc_transactions`;
53 CREATE TABLE `cmrc_transactions` (
54 `id` int(11) NOT NULL AUTO_INCREMENT,
55 `order_timestamp` varchar(24) NOT NULL DEFAULT '',
56 `payer_email` varchar(75) NOT NULL DEFAULT '',
57 `payer_id` varchar(60) NOT NULL DEFAULT '',
58 `payer_firstname` varchar(127) NOT NULL DEFAULT '',
59 `payer_lastname` varchar(127) NOT NULL DEFAULT '',
60 `country` varchar(8) NOT NULL DEFAULT '',
61 `product_sku` varchar(48) NOT NULL DEFAULT '',
62 `product_name` varchar(255) NOT NULL DEFAULT '',
63 `transaction_id` varchar(24) NOT NULL DEFAULT '',
64 `transaction_status` varchar(32) NOT NULL DEFAULT '',
65 `transaction_currency` varchar(8) NOT NULL DEFAULT '',
66 `transaction_amount` int(11) NOT NULL DEFAULT '0',
67 `transaction_fee` decimal(9,2) NOT NULL DEFAULT '0.00',
68 `is_fulfilled` smallint(1) NOT NULL DEFAULT '0',
69 `referral_code` varchar(191) DEFAULT NULL,
70 `nvp_request_json` text,
71 `nvp_response_json` text,
72 `nvp_details_json` text,
73 `creation_date` int(11) NOT NULL DEFAULT '0',
74 `modification_date` int(11) DEFAULT '0',
76 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
79 DROP TABLE IF EXISTS `live_events`;
81 CREATE TABLE `live_events` (
82 `id` int(11) NOT NULL AUTO_INCREMENT,
83 `date` int(11) DEFAULT NULL,
84 `user_id` int(11) DEFAULT NULL,
85 `venue_id` int(11) DEFAULT NULL,
86 `publish` tinyint(1) DEFAULT NULL,
87 `cancelled` tinyint(1) DEFAULT NULL,
89 `creation_date` int(11) DEFAULT NULL,
90 `modification_date` int(11) DEFAULT NULL,
92 KEY `live_events_user_id` (`user_id`)
93 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
96 DROP TABLE IF EXISTS `live_venues`;
98 CREATE TABLE `live_venues` (
99 `id` int(11) NOT NULL AUTO_INCREMENT,
100 `name` text NOT NULL,
107 `latitude` float DEFAULT NULL,
108 `longitude` float DEFAULT NULL,
111 `creation_date` int(11) DEFAULT NULL,
112 `modification_date` int(11) DEFAULT NULL,
114 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
117 DROP TABLE IF EXISTS `lock_codes`;
119 CREATE TABLE `lock_codes` (
120 `id` int(11) NOT NULL AUTO_INCREMENT,
122 `element_id` int(11) DEFAULT NULL,
123 `claim_date` int(11) DEFAULT NULL,
124 `creation_date` int(11) DEFAULT '0',
125 `modification_date` int(11) DEFAULT NULL,
127 KEY `lock_codes_element_id` (`element_id`)
128 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
131 DROP TABLE IF EXISTS `lock_passwords`;
133 CREATE TABLE `lock_passwords` (
134 `id` int(11) NOT NULL AUTO_INCREMENT,
136 `element_id` int(11) DEFAULT NULL,
137 `creation_date` int(11) DEFAULT '0',
138 `modification_date` int(11) DEFAULT NULL,
140 KEY `lock_passwords_element_id` (`element_id`)
141 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
144 DROP TABLE IF EXISTS `asst_analytics`;
146 CREATE TABLE `asst_analytics` (
147 `id` int(11) NOT NULL AUTO_INCREMENT,
148 `asset_id` int(11) NOT NULL DEFAULT '0',
149 `element_id` int(11) DEFAULT NULL,
150 `access_time` int(11) NOT NULL,
151 `client_ip` varchar(39) NOT NULL,
152 `client_proxy` varchar(39) NOT NULL,
153 `cash_session_id` varchar(24) NOT NULL,
154 `creation_date` int(11) DEFAULT NULL,
155 `modification_date` int(11) DEFAULT '0',
157 KEY `asst_analytics_asset_id` (`id`)
158 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
161 DROP TABLE IF EXISTS `lock_permissions`;
163 CREATE TABLE `lock_permissions` (
164 `id` int(11) NOT NULL AUTO_INCREMENT,
165 `user_id` int(11) NOT NULL,
166 `user_list_id` int(11) NOT NULL DEFAULT '0',
167 `element_id` int(11) NOT NULL DEFAULT '0',
168 `allowed_logins` int(11) NOT NULL DEFAULT '-1',
169 `total_logins` int(11) NOT NULL DEFAULT '0',
170 `date_expires` int(11) NOT NULL DEFAULT '-1',
171 `element_password` tinytext,
172 `added_by` int(11) NOT NULL DEFAULT '0',
173 `creation_date` int(11) DEFAULT NULL,
174 `modification_date` int(11) DEFAULT NULL,
176 KEY `lock_permissions_login_id` (`user_list_id`,`element_id`),
177 KEY `lock_permissions_element_id` (`element_id`)
178 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
181 DROP TABLE IF EXISTS `user_users`;
183 CREATE TABLE `user_users` (
184 `id` int(11) NOT NULL AUTO_INCREMENT,
185 `email_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
186 `password` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
187 `username` varchar(32) NOT NULL DEFAULT '',
188 `display_name` tinytext,
189 `first_name` tinytext,
190 `last_name` tinytext,
191 `organization` tinytext,
192 `address_line1` tinytext,
193 `address_line2` tinytext,
194 `address_city` tinytext,
195 `address_region` tinytext,
196 `address_postalcode` tinytext,
197 `address_country` tinytext,
198 `is_admin` bit(1) NOT NULL DEFAULT b'0',
199 `creation_date` int(11) DEFAULT NULL,
200 `modification_date` int(11) DEFAULT NULL,
202 KEY `email` (`email_address`)
203 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
206 DROP TABLE IF EXISTS `user_lists`;
208 CREATE TABLE `user_lists` (
209 `id` int(11) NOT NULL AUTO_INCREMENT,
210 `name` varchar(128) NOT NULL DEFAULT '',
212 `user_id` int(11) NOT NULL,
213 `settings_id` int(11) NOT NULL,
214 `creation_date` int(11) DEFAULT NULL,
215 `modification_date` int(11) DEFAULT '0',
217 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
220 DROP TABLE IF EXISTS `user_resetpassword`;
222 CREATE TABLE `user_resetpassword` (
223 `id` int(11) NOT NULL AUTO_INCREMENT,
224 `time_requested` int(11) NOT NULL DEFAULT '0',
225 `random_key` tinytext NOT NULL,
226 `user_id` int(11) NOT NULL DEFAULT '0',
227 `creation_date` int(11) DEFAULT NULL,
228 `modification_date` int(11) DEFAULT NULL,
230 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
233 DROP TABLE IF EXISTS `elmt_elements`;
235 CREATE TABLE `elmt_elements` (
236 `id` int(11) NOT NULL AUTO_INCREMENT,
237 `user_id` int(11) DEFAULT NULL,
239 `type` text NOT NULL,
241 `license_id` int(11) DEFAULT '0',
242 `creation_date` int(11) DEFAULT NULL,
243 `modification_date` int(11) DEFAULT NULL,
245 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
248 DROP TABLE IF EXISTS `elmt_analytics`;
250 CREATE TABLE `elmt_analytics` (
251 `id` int(11) NOT NULL AUTO_INCREMENT,
252 `element_id` int(11) NOT NULL,
253 `access_method` varchar(24) NOT NULL,
254 `access_location` text NOT NULL,
255 `lock_method_table` varchar(24) NOT NULL,
256 `lock_method_id` int(11) NOT NULL,
257 `access_time` int(11) NOT NULL,
258 `client_ip` varchar(39) NOT NULL,
259 `client_proxy` varchar(39) NOT NULL,
260 `cash_session_id` varchar(24) NOT NULL,
261 `creation_date` int(11) DEFAULT NULL,
262 `modification_date` int(11) DEFAULT '0',
264 KEY `elmt_analytics_element_id` (`element_id`)
265 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
268 DROP TABLE IF EXISTS `base_settings`;
270 CREATE TABLE `base_settings` (
271 `id` int(11) NOT NULL AUTO_INCREMENT,
273 `type` text NOT NULL,
274 `data` text NOT NULL,
275 `user_id` int(11) NOT NULL,
276 `creation_date` int(11) DEFAULT NULL,
277 `modification_date` int(11) DEFAULT NULL,
279 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
282 DROP TABLE IF EXISTS `user_lists_members`;
284 CREATE TABLE `user_lists_members` (
285 `id` int(11) NOT NULL AUTO_INCREMENT,
286 `user_id` int(11) NOT NULL,
287 `list_id` int(11) NOT NULL,
288 `verification_code` text NOT NULL,
289 `verified` bit(1) NOT NULL,
290 `initial_comment` text NOT NULL,
291 `additional_data` text NOT NULL,
292 `creation_date` int(11) DEFAULT NULL,
293 `modification_date` int(11) DEFAULT '0',
295 KEY `user_lists_members_user_id` (`user_id`),
296 KEY `user_lists_members_list_id` (`list_id`)
297 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
300 DROP TABLE IF EXISTS `live_guestlist`;
302 CREATE TABLE `live_guestlist` (
303 `id` int(11) NOT NULL AUTO_INCREMENT,
304 `event_id` int(128) NOT NULL,
306 `total_attendees` int(11) NOT NULL DEFAULT '1',
307 `comment` text NOT NULL,
308 `creation_date` int(11) DEFAULT NULL,
309 `modification_date` int(11) DEFAULT '0',
311 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
314 DROP TABLE IF EXISTS `base_metadata`;
316 CREATE TABLE `base_metadata` (
317 `id` int(11) NOT NULL AUTO_INCREMENT,
318 `scope_table_alias` varchar(64) NOT NULL DEFAULT '',
319 `scope_table_id` int(11) NOT NULL DEFAULT '0',
320 `user_id` int(11) NOT NULL DEFAULT '0',
322 `value` text NOT NULL,
323 `creation_date` int(11) DEFAULT NULL,
324 `modification_date` int(11) DEFAULT NULL,
326 KEY `base_metadata_scope_table` (`scope_table_alias`,`scope_table_id`)
327 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
330 SET FOREIGN_KEY_CHECKS = 1;