forked from ronaldbradford/schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoscommerce.sql
638 lines (584 loc) · 19.5 KB
/
oscommerce.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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# $Id$
#
# osCommerce, Open Source E-Commerce Solutions
# http://www.oscommerce.com
#
# Copyright (c) 2008 osCommerce
#
# Released under the GNU General Public License
#
# NOTE: * Please make any modifications to this file by hand!
# * DO NOT use a mysqldump created file for new changes!
# * Please take note of the table structure, and use this
# structure as a standard for future modifications!
# * Any tables you add here should be added in admin/backup.php
# and in catalog/install/includes/functions/database.php
# * To see the 'diff'erence between MySQL databases, use
# the mysqldiff perl script located in the extras
# directory of the 'catalog' module.
# * Comments should be like these, full line comments.
# (don't use inline comments)
CREATE SCHEMA IF NOT EXISTS oscommerce;
USE oscommerce;
DROP TABLE IF EXISTS action_recorder;
CREATE TABLE action_recorder (
id int NOT NULL auto_increment,
module varchar(255) NOT NULL,
user_id int,
user_name varchar(255),
identifier varchar(255) NOT NULL,
success char(1),
date_added datetime NOT NULL,
PRIMARY KEY (id),
KEY idx_action_recorder_module (module),
KEY idx_action_recorder_user_id (user_id),
KEY idx_action_recorder_identifier (identifier),
KEY idx_action_recorder_date_added (date_added)
);
DROP TABLE IF EXISTS address_book;
CREATE TABLE address_book (
address_book_id int NOT NULL auto_increment,
customers_id int NOT NULL,
entry_gender char(1),
entry_company varchar(255),
entry_firstname varchar(255) NOT NULL,
entry_lastname varchar(255) NOT NULL,
entry_street_address varchar(255) NOT NULL,
entry_suburb varchar(255),
entry_postcode varchar(255) NOT NULL,
entry_city varchar(255) NOT NULL,
entry_state varchar(255),
entry_country_id int DEFAULT '0' NOT NULL,
entry_zone_id int DEFAULT '0' NOT NULL,
PRIMARY KEY (address_book_id),
KEY idx_address_book_customers_id (customers_id)
);
DROP TABLE IF EXISTS address_format;
CREATE TABLE address_format (
address_format_id int NOT NULL auto_increment,
address_format varchar(128) NOT NULL,
address_summary varchar(48) NOT NULL,
PRIMARY KEY (address_format_id)
);
DROP TABLE IF EXISTS administrators;
CREATE TABLE administrators (
id int NOT NULL auto_increment,
user_name varchar(255) binary NOT NULL,
user_password varchar(60) NOT NULL,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS banners;
CREATE TABLE banners (
banners_id int NOT NULL auto_increment,
banners_title varchar(64) NOT NULL,
banners_url varchar(255) NOT NULL,
banners_image varchar(64) NOT NULL,
banners_group varchar(10) NOT NULL,
banners_html_text text,
expires_impressions int(7) DEFAULT '0',
expires_date datetime DEFAULT NULL,
date_scheduled datetime DEFAULT NULL,
date_added datetime NOT NULL,
date_status_change datetime DEFAULT NULL,
status int(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (banners_id),
KEY idx_banners_group (banners_group)
);
DROP TABLE IF EXISTS banners_history;
CREATE TABLE banners_history (
banners_history_id int NOT NULL auto_increment,
banners_id int NOT NULL,
banners_shown int(5) NOT NULL DEFAULT '0',
banners_clicked int(5) NOT NULL DEFAULT '0',
banners_history_date datetime NOT NULL,
PRIMARY KEY (banners_history_id),
KEY idx_banners_history_banners_id (banners_id)
);
DROP TABLE IF EXISTS categories;
CREATE TABLE categories (
categories_id int NOT NULL auto_increment,
categories_image varchar(64),
parent_id int DEFAULT '0' NOT NULL,
sort_order int(3),
date_added datetime,
last_modified datetime,
PRIMARY KEY (categories_id),
KEY idx_categories_parent_id (parent_id)
);
DROP TABLE IF EXISTS categories_description;
CREATE TABLE categories_description (
categories_id int DEFAULT '0' NOT NULL,
language_id int DEFAULT '1' NOT NULL,
categories_name varchar(32) NOT NULL,
PRIMARY KEY (categories_id, language_id),
KEY idx_categories_name (categories_name)
);
DROP TABLE IF EXISTS configuration;
CREATE TABLE configuration (
configuration_id int NOT NULL auto_increment,
configuration_title varchar(255) NOT NULL,
configuration_key varchar(255) NOT NULL,
configuration_value text NOT NULL,
configuration_description varchar(255) NOT NULL,
configuration_group_id int NOT NULL,
sort_order int(5) NULL,
last_modified datetime NULL,
date_added datetime NOT NULL,
use_function varchar(255) NULL,
set_function varchar(255) NULL,
PRIMARY KEY (configuration_id)
);
DROP TABLE IF EXISTS configuration_group;
CREATE TABLE configuration_group (
configuration_group_id int NOT NULL auto_increment,
configuration_group_title varchar(64) NOT NULL,
configuration_group_description varchar(255) NOT NULL,
sort_order int(5) NULL,
visible int(1) DEFAULT '1' NULL,
PRIMARY KEY (configuration_group_id)
);
DROP TABLE IF EXISTS counter;
CREATE TABLE counter (
startdate char(8),
counter int(12)
);
DROP TABLE IF EXISTS counter_history;
CREATE TABLE counter_history (
month char(8),
counter int(12)
);
DROP TABLE IF EXISTS countries;
CREATE TABLE countries (
countries_id int NOT NULL auto_increment,
countries_name varchar(255) NOT NULL,
countries_iso_code_2 char(2) NOT NULL,
countries_iso_code_3 char(3) NOT NULL,
address_format_id int NOT NULL,
PRIMARY KEY (countries_id),
KEY IDX_COUNTRIES_NAME (countries_name)
);
DROP TABLE IF EXISTS currencies;
CREATE TABLE currencies (
currencies_id int NOT NULL auto_increment,
title varchar(32) NOT NULL,
code char(3) NOT NULL,
symbol_left varchar(12),
symbol_right varchar(12),
decimal_point char(1),
thousands_point char(1),
decimal_places char(1),
value float(13,8),
last_updated datetime NULL,
PRIMARY KEY (currencies_id),
KEY idx_currencies_code (code)
);
DROP TABLE IF EXISTS customers;
CREATE TABLE customers (
customers_id int NOT NULL auto_increment,
customers_gender char(1),
customers_firstname varchar(255) NOT NULL,
customers_lastname varchar(255) NOT NULL,
customers_dob datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
customers_email_address varchar(255) NOT NULL,
customers_default_address_id int,
customers_telephone varchar(255) NOT NULL,
customers_fax varchar(255),
customers_password varchar(60) NOT NULL,
customers_newsletter char(1),
PRIMARY KEY (customers_id),
KEY idx_customers_email_address (customers_email_address)
);
DROP TABLE IF EXISTS customers_basket;
CREATE TABLE customers_basket (
customers_basket_id int NOT NULL auto_increment,
customers_id int NOT NULL,
products_id tinytext NOT NULL,
customers_basket_quantity int(2) NOT NULL,
final_price decimal(15,4),
customers_basket_date_added char(8),
PRIMARY KEY (customers_basket_id),
KEY idx_customers_basket_customers_id (customers_id)
);
DROP TABLE IF EXISTS customers_basket_attributes;
CREATE TABLE customers_basket_attributes (
customers_basket_attributes_id int NOT NULL auto_increment,
customers_id int NOT NULL,
products_id tinytext NOT NULL,
products_options_id int NOT NULL,
products_options_value_id int NOT NULL,
PRIMARY KEY (customers_basket_attributes_id),
KEY idx_customers_basket_att_customers_id (customers_id)
);
DROP TABLE IF EXISTS customers_info;
CREATE TABLE customers_info (
customers_info_id int NOT NULL,
customers_info_date_of_last_logon datetime,
customers_info_number_of_logons int(5),
customers_info_date_account_created datetime,
customers_info_date_account_last_modified datetime,
global_product_notifications int(1) DEFAULT '0',
password_reset_key char(40),
password_reset_date datetime,
PRIMARY KEY (customers_info_id)
);
DROP TABLE IF EXISTS languages;
CREATE TABLE languages (
languages_id int NOT NULL auto_increment,
name varchar(32) NOT NULL,
code char(2) NOT NULL,
image varchar(64),
directory varchar(32),
sort_order int(3),
PRIMARY KEY (languages_id),
KEY IDX_LANGUAGES_NAME (name)
);
DROP TABLE IF EXISTS manufacturers;
CREATE TABLE manufacturers (
manufacturers_id int NOT NULL auto_increment,
manufacturers_name varchar(32) NOT NULL,
manufacturers_image varchar(64),
date_added datetime NULL,
last_modified datetime NULL,
PRIMARY KEY (manufacturers_id),
KEY IDX_MANUFACTURERS_NAME (manufacturers_name)
);
DROP TABLE IF EXISTS manufacturers_info;
CREATE TABLE manufacturers_info (
manufacturers_id int NOT NULL,
languages_id int NOT NULL,
manufacturers_url varchar(255) NOT NULL,
url_clicked int(5) NOT NULL default '0',
date_last_click datetime NULL,
PRIMARY KEY (manufacturers_id, languages_id)
);
DROP TABLE IF EXISTS newsletters;
CREATE TABLE newsletters (
newsletters_id int NOT NULL auto_increment,
title varchar(255) NOT NULL,
content text NOT NULL,
module varchar(255) NOT NULL,
date_added datetime NOT NULL,
date_sent datetime,
status int(1),
locked int(1) DEFAULT '0',
PRIMARY KEY (newsletters_id)
);
DROP TABLE IF EXISTS orders;
CREATE TABLE orders (
orders_id int NOT NULL auto_increment,
customers_id int NOT NULL,
customers_name varchar(255) NOT NULL,
customers_company varchar(255),
customers_street_address varchar(255) NOT NULL,
customers_suburb varchar(255),
customers_city varchar(255) NOT NULL,
customers_postcode varchar(255) NOT NULL,
customers_state varchar(255),
customers_country varchar(255) NOT NULL,
customers_telephone varchar(255) NOT NULL,
customers_email_address varchar(255) NOT NULL,
customers_address_format_id int(5) NOT NULL,
delivery_name varchar(255) NOT NULL,
delivery_company varchar(255),
delivery_street_address varchar(255) NOT NULL,
delivery_suburb varchar(255),
delivery_city varchar(255) NOT NULL,
delivery_postcode varchar(255) NOT NULL,
delivery_state varchar(255),
delivery_country varchar(255) NOT NULL,
delivery_address_format_id int(5) NOT NULL,
billing_name varchar(255) NOT NULL,
billing_company varchar(255),
billing_street_address varchar(255) NOT NULL,
billing_suburb varchar(255),
billing_city varchar(255) NOT NULL,
billing_postcode varchar(255) NOT NULL,
billing_state varchar(255),
billing_country varchar(255) NOT NULL,
billing_address_format_id int(5) NOT NULL,
payment_method varchar(255) NOT NULL,
cc_type varchar(20),
cc_owner varchar(255),
cc_number varchar(32),
cc_expires varchar(4),
last_modified datetime,
date_purchased datetime,
orders_status int(5) NOT NULL,
orders_date_finished datetime,
currency char(3),
currency_value decimal(14,6),
PRIMARY KEY (orders_id),
KEY idx_orders_customers_id (customers_id)
);
DROP TABLE IF EXISTS orders_products;
CREATE TABLE orders_products (
orders_products_id int NOT NULL auto_increment,
orders_id int NOT NULL,
products_id int NOT NULL,
products_model varchar(12),
products_name varchar(64) NOT NULL,
products_price decimal(15,4) NOT NULL,
final_price decimal(15,4) NOT NULL,
products_tax decimal(7,4) NOT NULL,
products_quantity int(2) NOT NULL,
PRIMARY KEY (orders_products_id),
KEY idx_orders_products_orders_id (orders_id),
KEY idx_orders_products_products_id (products_id)
);
DROP TABLE IF EXISTS orders_status;
CREATE TABLE orders_status (
orders_status_id int DEFAULT '0' NOT NULL,
language_id int DEFAULT '1' NOT NULL,
orders_status_name varchar(32) NOT NULL,
public_flag int DEFAULT '1',
downloads_flag int DEFAULT '0',
PRIMARY KEY (orders_status_id, language_id),
KEY idx_orders_status_name (orders_status_name)
);
DROP TABLE IF EXISTS orders_status_history;
CREATE TABLE orders_status_history (
orders_status_history_id int NOT NULL auto_increment,
orders_id int NOT NULL,
orders_status_id int(5) NOT NULL,
date_added datetime NOT NULL,
customer_notified int(1) DEFAULT '0',
comments text,
PRIMARY KEY (orders_status_history_id),
KEY idx_orders_status_history_orders_id (orders_id)
);
DROP TABLE IF EXISTS orders_products_attributes;
CREATE TABLE orders_products_attributes (
orders_products_attributes_id int NOT NULL auto_increment,
orders_id int NOT NULL,
orders_products_id int NOT NULL,
products_options varchar(32) NOT NULL,
products_options_values varchar(32) NOT NULL,
options_values_price decimal(15,4) NOT NULL,
price_prefix char(1) NOT NULL,
PRIMARY KEY (orders_products_attributes_id),
KEY idx_orders_products_att_orders_id (orders_id)
);
DROP TABLE IF EXISTS orders_products_download;
CREATE TABLE orders_products_download (
orders_products_download_id int NOT NULL auto_increment,
orders_id int NOT NULL default '0',
orders_products_id int NOT NULL default '0',
orders_products_filename varchar(255) NOT NULL default '',
download_maxdays int(2) NOT NULL default '0',
download_count int(2) NOT NULL default '0',
PRIMARY KEY (orders_products_download_id),
KEY idx_orders_products_download_orders_id (orders_id)
);
DROP TABLE IF EXISTS orders_total;
CREATE TABLE orders_total (
orders_total_id int unsigned NOT NULL auto_increment,
orders_id int NOT NULL,
title varchar(255) NOT NULL,
text varchar(255) NOT NULL,
value decimal(15,4) NOT NULL,
class varchar(32) NOT NULL,
sort_order int NOT NULL,
PRIMARY KEY (orders_total_id),
KEY idx_orders_total_orders_id (orders_id)
);
DROP TABLE IF EXISTS products;
CREATE TABLE products (
products_id int NOT NULL auto_increment,
products_quantity int(4) NOT NULL,
products_model varchar(12),
products_image varchar(64),
products_price decimal(15,4) NOT NULL,
products_date_added datetime NOT NULL,
products_last_modified datetime,
products_date_available datetime,
products_weight decimal(5,2) NOT NULL,
products_status tinyint(1) NOT NULL,
products_tax_class_id int NOT NULL,
manufacturers_id int NULL,
products_ordered int NOT NULL default '0',
PRIMARY KEY (products_id),
KEY idx_products_model (products_model),
KEY idx_products_date_added (products_date_added)
);
DROP TABLE IF EXISTS products_attributes;
CREATE TABLE products_attributes (
products_attributes_id int NOT NULL auto_increment,
products_id int NOT NULL,
options_id int NOT NULL,
options_values_id int NOT NULL,
options_values_price decimal(15,4) NOT NULL,
price_prefix char(1) NOT NULL,
PRIMARY KEY (products_attributes_id),
KEY idx_products_attributes_products_id (products_id)
);
DROP TABLE IF EXISTS products_attributes_download;
CREATE TABLE products_attributes_download (
products_attributes_id int NOT NULL,
products_attributes_filename varchar(255) NOT NULL default '',
products_attributes_maxdays int(2) default '0',
products_attributes_maxcount int(2) default '0',
PRIMARY KEY (products_attributes_id)
);
DROP TABLE IF EXISTS products_description;
CREATE TABLE products_description (
products_id int NOT NULL auto_increment,
language_id int NOT NULL default '1',
products_name varchar(64) NOT NULL default '',
products_description text,
products_url varchar(255) default NULL,
products_viewed int(5) default '0',
PRIMARY KEY (products_id,language_id),
KEY products_name (products_name)
);
DROP TABLE IF EXISTS products_images;
CREATE TABLE products_images (
id int NOT NULL auto_increment,
products_id int NOT NULL,
image varchar(64),
htmlcontent text,
sort_order int NOT NULL,
PRIMARY KEY (id),
KEY products_images_prodid (products_id)
);
DROP TABLE IF EXISTS products_notifications;
CREATE TABLE products_notifications (
products_id int NOT NULL,
customers_id int NOT NULL,
date_added datetime NOT NULL,
PRIMARY KEY (products_id, customers_id)
);
DROP TABLE IF EXISTS products_options;
CREATE TABLE products_options (
products_options_id int NOT NULL default '0',
language_id int NOT NULL default '1',
products_options_name varchar(32) NOT NULL default '',
PRIMARY KEY (products_options_id,language_id)
);
DROP TABLE IF EXISTS products_options_values;
CREATE TABLE products_options_values (
products_options_values_id int NOT NULL default '0',
language_id int NOT NULL default '1',
products_options_values_name varchar(64) NOT NULL default '',
PRIMARY KEY (products_options_values_id,language_id)
);
DROP TABLE IF EXISTS products_options_values_to_products_options;
CREATE TABLE products_options_values_to_products_options (
products_options_values_to_products_options_id int NOT NULL auto_increment,
products_options_id int NOT NULL,
products_options_values_id int NOT NULL,
PRIMARY KEY (products_options_values_to_products_options_id)
);
DROP TABLE IF EXISTS products_to_categories;
CREATE TABLE products_to_categories (
products_id int NOT NULL,
categories_id int NOT NULL,
PRIMARY KEY (products_id,categories_id)
);
DROP TABLE IF EXISTS reviews;
CREATE TABLE reviews (
reviews_id int NOT NULL auto_increment,
products_id int NOT NULL,
customers_id int,
customers_name varchar(255) NOT NULL,
reviews_rating int(1),
date_added datetime,
last_modified datetime,
reviews_status tinyint(1) NOT NULL default '0',
reviews_read int(5) NOT NULL default '0',
PRIMARY KEY (reviews_id),
KEY idx_reviews_products_id (products_id),
KEY idx_reviews_customers_id (customers_id)
);
DROP TABLE IF EXISTS reviews_description;
CREATE TABLE reviews_description (
reviews_id int NOT NULL,
languages_id int NOT NULL,
reviews_text text NOT NULL,
PRIMARY KEY (reviews_id, languages_id)
);
DROP TABLE IF EXISTS sec_directory_whitelist;
CREATE TABLE sec_directory_whitelist (
id int NOT NULL auto_increment,
directory varchar(255) NOT NULL,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS sessions;
CREATE TABLE sessions (
sesskey varchar(32) NOT NULL,
expiry int(11) unsigned NOT NULL,
value text NOT NULL,
PRIMARY KEY (sesskey)
);
DROP TABLE IF EXISTS specials;
CREATE TABLE specials (
specials_id int NOT NULL auto_increment,
products_id int NOT NULL,
specials_new_products_price decimal(15,4) NOT NULL,
specials_date_added datetime,
specials_last_modified datetime,
expires_date datetime,
date_status_change datetime,
status int(1) NOT NULL DEFAULT '1',
PRIMARY KEY (specials_id),
KEY idx_specials_products_id (products_id)
);
DROP TABLE IF EXISTS tax_class;
CREATE TABLE tax_class (
tax_class_id int NOT NULL auto_increment,
tax_class_title varchar(32) NOT NULL,
tax_class_description varchar(255) NOT NULL,
last_modified datetime NULL,
date_added datetime NOT NULL,
PRIMARY KEY (tax_class_id)
);
DROP TABLE IF EXISTS tax_rates;
CREATE TABLE tax_rates (
tax_rates_id int NOT NULL auto_increment,
tax_zone_id int NOT NULL,
tax_class_id int NOT NULL,
tax_priority int(5) DEFAULT 1,
tax_rate decimal(7,4) NOT NULL,
tax_description varchar(255) NOT NULL,
last_modified datetime NULL,
date_added datetime NOT NULL,
PRIMARY KEY (tax_rates_id)
);
DROP TABLE IF EXISTS geo_zones;
CREATE TABLE geo_zones (
geo_zone_id int NOT NULL auto_increment,
geo_zone_name varchar(32) NOT NULL,
geo_zone_description varchar(255) NOT NULL,
last_modified datetime NULL,
date_added datetime NOT NULL,
PRIMARY KEY (geo_zone_id)
);
DROP TABLE IF EXISTS whos_online;
CREATE TABLE whos_online (
customer_id int,
full_name varchar(255) NOT NULL,
session_id varchar(128) NOT NULL,
ip_address varchar(15) NOT NULL,
time_entry varchar(14) NOT NULL,
time_last_click varchar(14) NOT NULL,
last_page_url text NOT NULL
);
DROP TABLE IF EXISTS zones;
CREATE TABLE zones (
zone_id int NOT NULL auto_increment,
zone_country_id int NOT NULL,
zone_code varchar(32) NOT NULL,
zone_name varchar(255) NOT NULL,
PRIMARY KEY (zone_id),
KEY idx_zones_country_id (zone_country_id)
);
DROP TABLE IF EXISTS zones_to_geo_zones;
CREATE TABLE zones_to_geo_zones (
association_id int NOT NULL auto_increment,
zone_country_id int NOT NULL,
zone_id int NULL,
geo_zone_id int NULL,
last_modified datetime NULL,
date_added datetime NOT NULL,
PRIMARY KEY (association_id),
KEY idx_zones_to_geo_zones_country_id (zone_country_id)
);