source: branches/version-2_5-dev/html/install/sql/create_table_mysql.sql @ 20411

Revision 20411, 28.8 KB checked in by shutta, 11 years ago (diff)

refs #1058
mtb_page_rowsの廃止

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
Line 
1create table dtb_module_update_logs(
2    log_id int  NOT NULL,
3    module_id int NOT NULL,
4    buckup_path text,
5    error_flg smallint DEFAULT 0,
6    error text,
7    ok text,
8    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
9    update_date timestamp NOT NULL,
10    PRIMARY KEY (log_id)
11) ENGINE=InnoDB;
12
13CREATE TABLE dtb_ownersstore_settings (
14    public_key text
15) ENGINE=InnoDB;
16
17CREATE TABLE dtb_kiyaku (
18    kiyaku_id int  NOT NULL,
19    kiyaku_title text NOT NULL,
20    kiyaku_text text NOT NULL,
21    rank int NOT NULL DEFAULT 0,
22    creator_id int NOT NULL,
23    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
24    update_date timestamp NOT NULL,
25    del_flg smallint NOT NULL DEFAULT 0,
26    PRIMARY KEY (kiyaku_id)
27) ENGINE=InnoDB;
28
29CREATE TABLE dtb_holiday (
30    holiday_id int  NOT NULL,
31    title text NOT NULL,
32    month smallint NOT NULL,
33    day smallint NOT NULL,
34    rank int NOT NULL DEFAULT 0,
35    creator_id int NOT NULL,
36    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
37    update_date timestamp NOT NULL,
38    del_flg smallint NOT NULL DEFAULT 0,
39    PRIMARY KEY (holiday_id)
40) ENGINE=InnoDB;
41
42CREATE TABLE mtb_zip (
43    code text,
44    old_zipcode text,
45    zipcode text,
46    state_kana text,
47    city_kana text,
48    town_kana text,
49    state text,
50    city text,
51    town text,
52    flg1 text,
53    flg2 text,
54    flg3 text,
55    flg4 text,
56    flg5 text,
57    flg6 text
58) ENGINE=InnoDB;
59
60CREATE TABLE dtb_update (
61    module_id int NOT NULL,
62    module_name text NOT NULL,
63    now_version text,
64    latest_version text NOT NULL,
65    module_explain text,
66    main_php text NOT NULL,
67    extern_php text NOT NULL,
68    install_sql text,
69    uninstall_sql text,
70    other_files text,
71    del_flg smallint NOT NULL DEFAULT 0,
72    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
73    update_date timestamp NOT NULL,
74    release_date datetime NOT NULL,
75    PRIMARY KEY (module_id)
76) ENGINE=InnoDB;
77
78CREATE TABLE dtb_baseinfo (
79    company_name text,
80    company_kana text,
81    zip01 text,
82    zip02 text,
83    pref smallint,
84    addr01 text,
85    addr02 text,
86    tel01 text,
87    tel02 text,
88    tel03 text,
89    fax01 text,
90    fax02 text,
91    fax03 text,
92    business_hour text,
93    law_company text,
94    law_manager text,
95    law_zip01 text,
96    law_zip02 text,
97    law_pref smallint,
98    law_addr01 text,
99    law_addr02 text,
100    law_tel01 text,
101    law_tel02 text,
102    law_tel03 text,
103    law_fax01 text,
104    law_fax02 text,
105    law_fax03 text,
106    law_email text,
107    law_url text,
108    law_term01 text,
109    law_term02 text,
110    law_term03 text,
111    law_term04 text,
112    law_term05 text,
113    law_term06 text,
114    law_term07 text,
115    law_term08 text,
116    law_term09 text,
117    law_term10 text,
118    tax numeric NOT NULL DEFAULT 5,
119    tax_rule smallint NOT NULL DEFAULT 1,
120    email01 text,
121    email02 text,
122    email03 text,
123    email04 text,
124    email05 text,
125    free_rule numeric,
126    shop_name text,
127    shop_kana text,
128    shop_name_eng text,
129    point_rate numeric NOT NULL DEFAULT 0,
130    welcome_point numeric NOT NULL DEFAULT 0,
131    update_date timestamp NOT NULL,
132    top_tpl text,
133    product_tpl text,
134    detail_tpl text,
135    mypage_tpl text,
136    good_traded text,
137    message text,
138    regular_holiday_ids text,
139    latitude text,
140    longitude text,
141    downloadable_days numeric DEFAULT 30,
142    downloadable_days_unlimited smallint
143) ENGINE=InnoDB;
144
145CREATE TABLE dtb_deliv (
146    deliv_id int  NOT NULL,
147    product_type_id int,
148    name text,
149    service_name text,
150    remark text,
151    confirm_url text,
152    rank int,
153    status smallint NOT NULL DEFAULT 1,
154    del_flg smallint NOT NULL DEFAULT 0,
155    creator_id int NOT NULL,
156    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
157    update_date timestamp NOT NULL,
158    PRIMARY KEY (deliv_id)
159) ENGINE=InnoDB;
160
161CREATE TABLE dtb_payment_options (
162    deliv_id int NOT NULL,
163    payment_id int NOT NULL,
164    rank int,
165    PRIMARY KEY (deliv_id, payment_id)
166) ENGINE=InnoDB;
167
168CREATE TABLE dtb_delivtime (
169    deliv_id int NOT NULL,
170    time_id int NOT NULL,
171    deliv_time text NOT NULL,
172    PRIMARY KEY (deliv_id, time_id)
173) ENGINE=InnoDB;
174
175CREATE TABLE dtb_delivfee (
176    deliv_id int NOT NULL,
177    fee_id int  NOT NULL,
178    fee numeric NOT NULL,
179    pref smallint,
180    PRIMARY KEY (deliv_id, fee_id)
181) ENGINE=InnoDB;
182
183CREATE TABLE dtb_payment (
184    payment_id int  NOT NULL,
185    payment_method text,
186    charge numeric,
187    rule numeric,
188    rank int,
189    note text,
190    fix smallint,
191    status smallint NOT NULL DEFAULT 1,
192    del_flg smallint NOT NULL DEFAULT 0,
193    creator_id int NOT NULL,
194    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
195    update_date timestamp NOT NULL,
196    payment_image text,
197    upper_rule numeric,
198    charge_flg smallint DEFAULT 1,
199    rule_min numeric,
200    upper_rule_max numeric,
201    module_id int,
202    module_path text,
203    memo01 text,
204    memo02 text,
205    memo03 text,
206    memo04 text,
207    memo05 text,
208    memo06 text,
209    memo07 text,
210    memo08 text,
211    memo09 text,
212    memo10 text,
213    PRIMARY KEY (payment_id)
214) ENGINE=InnoDB;
215
216CREATE TABLE dtb_mailtemplate (
217    template_id int NOT NULL,
218    subject text,
219    header text,
220    footer text,
221    creator_id int NOT NULL,
222    del_flg smallint NOT NULL DEFAULT 0,
223    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
224    update_date timestamp NOT NULL
225) ENGINE=InnoDB;
226
227CREATE TABLE dtb_mailmaga_template (
228    template_id int NOT NULL,
229    subject text,
230    mail_method int,
231    body text,
232    del_flg smallint NOT NULL DEFAULT 0,
233    creator_id int NOT NULL,
234    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
235    update_date timestamp NOT NULL,
236    PRIMARY KEY (template_id)
237) ENGINE=InnoDB;
238
239CREATE TABLE dtb_send_history (
240    send_id int  NOT NULL,
241    mail_method smallint,
242    subject text,
243    body text,
244    send_count int,
245    complete_count int NOT NULL DEFAULT 0,
246    start_date datetime,
247    end_date datetime,
248    search_data text,
249    del_flg smallint NOT NULL DEFAULT 0,
250    creator_id int NOT NULL,
251    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
252    update_date timestamp NOT NULL,
253    PRIMARY KEY (send_id)
254) ENGINE=InnoDB;
255
256CREATE TABLE dtb_send_customer (
257    customer_id int,
258    send_id int NOT NULL,
259    email text,
260    name text,
261    send_flag smallint,
262    PRIMARY KEY (send_id, customer_id)
263) ENGINE=InnoDB;
264
265CREATE TABLE dtb_products (
266    product_id int  NOT NULL,
267    name text NOT NULL,
268    maker_id int,
269    status smallint NOT NULL DEFAULT 2,
270    comment1 text,
271    comment2 text,
272    comment3 mediumtext,
273    comment4 text,
274    comment5 text,
275    comment6 text,
276    note text,
277    main_list_comment text,
278    main_list_image text,
279    main_comment mediumtext,
280    main_image text,
281    main_large_image text,
282    sub_title1 text,
283    sub_comment1 mediumtext,
284    sub_image1 text,
285    sub_large_image1 text,
286    sub_title2 text,
287    sub_comment2 mediumtext,
288    sub_image2 text,
289    sub_large_image2 text,
290    sub_title3 text,
291    sub_comment3 mediumtext,
292    sub_image3 text,
293    sub_large_image3 text,
294    sub_title4 text,
295    sub_comment4 mediumtext,
296    sub_image4 text,
297    sub_large_image4 text,
298    sub_title5 text,
299    sub_comment5 mediumtext,
300    sub_image5 text,
301    sub_large_image5 text,
302    sub_title6 text,
303    sub_comment6 mediumtext,
304    sub_image6 text,
305    sub_large_image6 text,
306    del_flg smallint NOT NULL DEFAULT 0,
307    creator_id int NOT NULL,
308    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
309    update_date timestamp NOT NULL,
310    deliv_date_id int,
311    PRIMARY KEY (product_id)
312) ENGINE=InnoDB;
313
314CREATE TABLE dtb_products_class (
315    product_class_id int  NOT NULL,
316    product_id int NOT NULL,
317    class_combination_id int,
318    product_type_id int NOT NULL DEFAULT 0,
319    product_code text,
320    stock numeric,
321    stock_unlimited smallint NOT NULL DEFAULT 0,
322    sale_limit numeric,
323    price01 numeric,
324    price02 numeric NOT NULL,
325    deliv_fee numeric,
326    point_rate numeric,
327    creator_id int NOT NULL,
328    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
329    update_date timestamp NOT NULL,
330    down_filename text,
331    down_realfilename text,
332    del_flg smallint NOT NULL DEFAULT 0,
333    PRIMARY KEY (product_class_id)
334) ENGINE=InnoDB;
335
336CREATE TABLE dtb_class (
337    class_id int  NOT NULL,
338    name text,
339    rank int,
340    creator_id int NOT NULL,
341    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
342    update_date timestamp NOT NULL,
343    del_flg smallint NOT NULL DEFAULT 0,
344    PRIMARY KEY (class_id)
345) ENGINE=InnoDB;
346
347CREATE TABLE dtb_classcategory (
348    classcategory_id int  NOT NULL,
349    name text,
350    class_id int NOT NULL,
351    rank int,
352    creator_id int NOT NULL,
353    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
354    update_date timestamp NOT NULL,
355    del_flg smallint NOT NULL DEFAULT 0,
356    PRIMARY KEY (classcategory_id)
357) ENGINE=InnoDB;
358
359CREATE TABLE dtb_class_combination (
360    class_combination_id int NOT NULL,
361    parent_class_combination_id int,
362    classcategory_id int NOT NULL,
363    level int,
364    PRIMARY KEY(class_combination_id)
365) ENGINE=InnoDB;
366
367CREATE TABLE dtb_category (
368    category_id int  NOT NULL,
369    category_name text,
370    parent_category_id int NOT NULL DEFAULT 0,
371    level int NOT NULL,
372    rank int,
373    creator_id int NOT NULL,
374    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
375    update_date timestamp NOT NULL,
376    del_flg smallint NOT NULL DEFAULT 0,
377    PRIMARY KEY (category_id)
378) ENGINE=InnoDB;
379
380CREATE TABLE dtb_product_categories (
381    product_id int NOT NULL,
382    category_id int NOT NULL,
383    rank int NOT NULL,
384    PRIMARY KEY(product_id, category_id)
385) ENGINE=InnoDB;
386
387CREATE TABLE dtb_product_status (
388    product_status_id smallint NOT NULL,
389    product_id int NOT NULL,
390    creator_id int NOT NULL,
391    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
392    update_date timestamp NOT NULL,
393    del_flg smallint NOT NULL DEFAULT 0,
394    PRIMARY KEY(product_status_id, product_id)
395) ENGINE=InnoDB;
396
397CREATE TABLE dtb_recommend_products (
398    product_id int NOT NULL,
399    recommend_product_id int NOT NULL,
400    rank int NOT NULL,
401    comment text,
402    status smallint NOT NULL DEFAULT 0,
403    creator_id int NOT NULL,
404    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
405    update_date timestamp NOT NULL
406) ENGINE=InnoDB;
407
408CREATE TABLE dtb_review (
409    review_id int  NOT NULL,
410    product_id int NOT NULL,
411    reviewer_name text NOT NULL,
412    reviewer_url text,
413    sex smallint,
414    customer_id int,
415    recommend_level smallint NOT NULL,
416    title text NOT NULL,
417    comment text NOT NULL,
418    status smallint DEFAULT 2,
419    creator_id int NOT NULL,
420    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
421    update_date timestamp NOT NULL,
422    del_flg smallint NOT NULL DEFAULT 0,
423    PRIMARY KEY (review_id)
424) ENGINE=InnoDB;
425
426CREATE TABLE dtb_customer_favorite_products (
427    customer_id int NOT NULL,
428    product_id int NOT NULL,
429    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
430    update_date timestamp NOT NULL,
431    PRIMARY KEY (customer_id, product_id)
432) ENGINE=InnoDB;
433
434CREATE TABLE dtb_category_count (
435    category_id int NOT NULL,
436    product_count int NOT NULL,
437    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
438) ENGINE=InnoDB;
439
440CREATE TABLE dtb_category_total_count (
441    category_id int NOT NULL,
442    product_count int,
443    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
444) ENGINE=InnoDB;
445
446CREATE TABLE dtb_news (
447    news_id int  NOT NULL,
448    news_date datetime,
449    rank int,
450    news_title text NOT NULL,
451    news_comment text,
452    news_url text,
453    news_select smallint NOT NULL DEFAULT 0,
454    link_method text,
455    creator_id int NOT NULL,
456    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
457    update_date timestamp NOT NULL,
458    del_flg smallint NOT NULL DEFAULT 0,
459    PRIMARY KEY (news_id)
460) ENGINE=InnoDB;
461
462CREATE TABLE dtb_best_products (
463    best_id int  NOT NULL,
464    category_id int NOT NULL,
465    rank int NOT NULL DEFAULT 0,
466    product_id int NOT NULL,
467    title text,
468    comment text,
469    creator_id int NOT NULL,
470    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
471    update_date timestamp NOT NULL,
472    del_flg smallint NOT NULL DEFAULT 0,
473    PRIMARY KEY (best_id)
474) ENGINE=InnoDB;
475
476CREATE TABLE dtb_mail_history (
477    send_id int  NOT NULL,
478    order_id int NOT NULL,
479    send_date datetime,
480    template_id int,
481    creator_id int NOT NULL,
482    subject text,
483    mail_body text,
484    PRIMARY KEY (send_id)
485) ENGINE=InnoDB;
486
487CREATE TABLE dtb_customer (
488    customer_id int  NOT NULL,
489    name01 text NOT NULL,
490    name02 text NOT NULL,
491    kana01 text NOT NULL,
492    kana02 text NOT NULL,
493    zip01 text,
494    zip02 text,
495    pref smallint,
496    addr01 text,
497    addr02 text,
498    email text NOT NULL,
499    email_mobile text,
500    tel01 text,
501    tel02 text,
502    tel03 text,
503    fax01 text,
504    fax02 text,
505    fax03 text,
506    sex smallint,
507    job smallint,
508    birth datetime,
509    password text,
510    reminder smallint,
511    reminder_answer text,
512    salt text,
513    secret_key varchar(50) NOT NULL UNIQUE,
514    first_buy_date datetime,
515    last_buy_date datetime,
516    buy_times numeric DEFAULT 0,
517    buy_total numeric DEFAULT 0,
518    point numeric DEFAULT 0,
519    note text,
520    status smallint NOT NULL DEFAULT 1,
521    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
522    update_date timestamp NOT NULL,
523    del_flg smallint NOT NULL DEFAULT 0,
524    mobile_phone_id text,
525    mailmaga_flg smallint,
526    PRIMARY KEY (customer_id)
527) ENGINE=InnoDB;
528
529CREATE TABLE dtb_order (
530    order_id int  NOT NULL,
531    order_temp_id text,
532    customer_id int NOT NULL,
533    message text,
534    order_name01 text,
535    order_name02 text,
536    order_kana01 text,
537    order_kana02 text,
538    order_email text,
539    order_tel01 text,
540    order_tel02 text,
541    order_tel03 text,
542    order_fax01 text,
543    order_fax02 text,
544    order_fax03 text,
545    order_zip01 text,
546    order_zip02 text,
547    order_pref smallint,
548    order_addr01 text,
549    order_addr02 text,
550    order_sex smallint,
551    order_birth datetime,
552    order_job int,
553    subtotal numeric,
554    discount numeric,
555    deliv_id int,
556    deliv_fee numeric,
557    charge numeric,
558    use_point numeric,
559    add_point numeric,
560    birth_point numeric DEFAULT 0,
561    tax numeric,
562    total numeric,
563    payment_total numeric,
564    payment_id int,
565    payment_method text,
566    note text,
567    status smallint,
568    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
569    update_date timestamp NOT NULL,
570    commit_date datetime,
571    payment_date datetime,
572    device_type_id int,
573    del_flg smallint NOT NULL DEFAULT 0,
574    memo01 text,
575    memo02 text,
576    memo03 text,
577    memo04 text,
578    memo05 text,
579    memo06 text,
580    memo07 text,
581    memo08 text,
582    memo09 text,
583    memo10 text,
584    PRIMARY KEY (order_id)
585) ENGINE=InnoDB;
586
587CREATE TABLE dtb_order_temp (
588    order_temp_id text NOT NULL,
589    customer_id int NOT NULL,
590    message text,
591    order_name01 text,
592    order_name02 text,
593    order_kana01 text,
594    order_kana02 text,
595    order_email text,
596    order_tel01 text,
597    order_tel02 text,
598    order_tel03 text,
599    order_fax01 text,
600    order_fax02 text,
601    order_fax03 text,
602    order_zip01 text,
603    order_zip02 text,
604    order_pref smallint,
605    order_addr01 text,
606    order_addr02 text,
607    order_sex smallint,
608    order_birth datetime,
609    order_job int,
610    subtotal numeric,
611    discount numeric,
612    deliv_id int,
613    deliv_fee numeric,
614    charge numeric,
615    use_point numeric,
616    add_point numeric,
617    birth_point numeric DEFAULT 0,
618    tax numeric,
619    total numeric,
620    payment_total numeric,
621    payment_id int,
622    payment_method text,
623    note text,
624    mail_flag smallint,
625    status smallint,
626    deliv_check smallint,
627    point_check smallint,
628    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
629    update_date timestamp NOT NULL,
630    device_type_id int,
631    del_flg smallint NOT NULL DEFAULT 0,
632    order_id int,
633    memo01 text,
634    memo02 text,
635    memo03 text,
636    memo04 text,
637    memo05 text,
638    memo06 text,
639    memo07 text,
640    memo08 text,
641    memo09 text,
642    memo10 text,
643    session text
644) ENGINE=InnoDB;
645
646CREATE TABLE dtb_shipping (
647    shipping_id int NOT NULL,
648    order_id int NOT NULL,
649    shipping_name01 text,
650    shipping_name02 text,
651    shipping_kana01 text,
652    shipping_kana02 text,
653    shipping_tel01 text,
654    shipping_tel02 text,
655    shipping_tel03 text,
656    shipping_fax01 text,
657    shipping_fax02 text,
658    shipping_fax03 text,
659    shipping_pref smallint,
660    shipping_zip01 text,
661    shipping_zip02 text,
662    shipping_addr01 text,
663    shipping_addr02 text,
664    deliv_id int NOT NULL,
665    time_id int,
666    shipping_time text,
667    shipping_num text,
668    shipping_date datetime,
669    shipping_commit_date datetime,
670    rank int,
671    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
672    update_date timestamp NOT NULL,
673    del_flg smallint NOT NULL DEFAULT 0,
674    PRIMARY KEY (shipping_id, order_id)
675) ENGINE=InnoDB;
676
677CREATE TABLE dtb_shipment_item (
678    shipping_id int NOT NULL,
679    product_class_id int NOT NULL,
680    order_id int NOT NULL,
681    product_name text NOT NULL,
682    product_code text,
683    classcategory_name1 text,
684    classcategory_name2 text,
685    price numeric,
686    quantity numeric,
687    PRIMARY KEY (shipping_id, product_class_id, order_id)
688) ENGINE=InnoDB;
689
690CREATE TABLE dtb_other_deliv (
691    other_deliv_id int  NOT NULL,
692    customer_id int NOT NULL,
693    name01 text,
694    name02 text,
695    kana01 text,
696    kana02 text,
697    zip01 text,
698    zip02 text,
699    pref smallint,
700    addr01 text,
701    addr02 text,
702    tel01 text,
703    tel02 text,
704    tel03 text,
705    PRIMARY KEY (other_deliv_id)
706) ENGINE=InnoDB;
707
708CREATE TABLE dtb_order_detail (
709    order_id int NOT NULL,
710    product_id int NOT NULL,
711    product_class_id int NOT NULL,
712    product_name text NOT NULL,
713    product_code text,
714    classcategory_name1 text,
715    classcategory_name2 text,
716    price numeric,
717    quantity numeric,
718    point_rate numeric
719) ENGINE=InnoDB;
720
721CREATE TABLE dtb_member (
722    member_id int  NOT NULL,
723    name text,
724    department text,
725    login_id text NOT NULL,
726    password text NOT NULL,
727    salt text NOT NULL,
728    authority smallint NOT NULL,
729    rank int NOT NULL DEFAULT 0,
730    work smallint NOT NULL DEFAULT 1,
731    del_flg smallint NOT NULL DEFAULT 0,
732    creator_id int NOT NULL,
733    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
734    update_date timestamp NOT NULL,
735    login_date datetime,
736    PRIMARY KEY (member_id)
737) ENGINE=InnoDB;
738
739CREATE TABLE dtb_pagelayout (
740    device_type_id int NOT NULL,
741    page_id int  NOT NULL,
742    page_name text,
743    url text NOT NULL,
744    filename text,
745    header_chk smallint DEFAULT 1,
746    footer_chk smallint DEFAULT 1,
747    edit_flg smallint DEFAULT 1,
748    author text,
749    description text,
750    keyword text,
751    update_url text,
752    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
753    update_date timestamp NOT NULL,
754    PRIMARY KEY (device_type_id, page_id)
755) ENGINE=InnoDB;
756
757CREATE TABLE dtb_bloc (
758    device_type_id int NOT NULL,
759    bloc_id int  NOT NULL,
760    bloc_name text,
761    tpl_path text,
762    filename varchar(50) NOT NULL,
763    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
764    update_date timestamp NOT NULL,
765    php_path text,
766    deletable_flg smallint NOT NULL DEFAULT 1,
767    PRIMARY KEY (device_type_id, bloc_id),
768    UNIQUE (device_type_id, filename)
769) ENGINE=InnoDB;
770
771CREATE TABLE dtb_blocposition (
772    device_type_id int NOT NULL,
773    page_id int NOT NULL,
774    target_id int NOT NULL,
775    bloc_id int NOT NULL,
776    bloc_row int,
777    anywhere smallint DEFAULT 0 NOT NULL,
778    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
779) ENGINE=InnoDB;
780
781CREATE TABLE dtb_csv (
782    no int,
783    csv_id int NOT NULL,
784    col text,
785    disp_name text,
786    rank int,
787    rw_flg smallint DEFAULT 1,
788    status smallint NOT NULL DEFAULT 1,
789    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
790    update_date timestamp NOT NULL,
791    mb_convert_kana_option text,
792    size_const_type text,
793    error_check_types text,
794    PRIMARY KEY (no)
795) ENGINE=InnoDB;
796
797CREATE TABLE dtb_csv_sql (
798    sql_id int,
799    sql_name text NOT NULL,
800    csv_sql text,
801    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
802    update_date timestamp NOT NULL,
803    PRIMARY KEY (sql_id)
804) ENGINE=InnoDB;
805
806CREATE TABLE dtb_templates (
807    template_code varchar(50) NOT NULL,
808    device_type_id int NOT NULL,
809    template_name text,
810    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
811    update_date timestamp NOT NULL,
812    PRIMARY KEY (template_code)
813) ENGINE=InnoDB;
814
815CREATE TABLE dtb_maker (
816    maker_id int NOT NULL,
817    name text NOT NULL,
818    rank int NOT NULL DEFAULT 0,
819    creator_id int NOT NULL,
820    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
821    update_date timestamp NOT NULL,
822    del_flg smallint NOT NULL DEFAULT 0,
823    PRIMARY KEY (maker_id)
824) ENGINE=InnoDB;
825
826CREATE TABLE dtb_maker_count (
827    maker_id int NOT NULL,
828    product_count int NOT NULL,
829    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
830) ENGINE=InnoDB;
831
832CREATE TABLE mtb_pref (
833    id smallint,
834    name text,
835    rank smallint NOT NULL DEFAULT 0,
836    PRIMARY KEY (id)
837) ENGINE=InnoDB;
838
839CREATE TABLE mtb_permission (
840    id text,
841    name text,
842    rank smallint NOT NULL DEFAULT 0,
843    PRIMARY KEY (id(32))
844) ENGINE=InnoDB;
845
846CREATE TABLE mtb_disable_logout (
847    id smallint,
848    name text,
849    rank smallint NOT NULL DEFAULT 0,
850    PRIMARY KEY (id)
851) ENGINE=InnoDB;
852
853CREATE TABLE mtb_authority (
854    id smallint,
855    name text,
856    rank smallint NOT NULL DEFAULT 0,
857    PRIMARY KEY (id)
858) ENGINE=InnoDB;
859
860CREATE TABLE mtb_auth_excludes (
861    id smallint,
862    name text,
863    rank smallint NOT NULL DEFAULT 0,
864    PRIMARY KEY (id)
865) ENGINE=InnoDB;
866
867CREATE TABLE mtb_work (
868    id smallint,
869    name text,
870    rank smallint NOT NULL DEFAULT 0,
871    PRIMARY KEY (id)
872) ENGINE=InnoDB;
873
874CREATE TABLE mtb_disp (
875    id smallint,
876    name text,
877    rank smallint NOT NULL DEFAULT 0,
878    PRIMARY KEY (id)
879) ENGINE=InnoDB;
880
881CREATE TABLE mtb_class (
882    id smallint,
883    name text,
884    rank smallint NOT NULL DEFAULT 0,
885    PRIMARY KEY (id)
886) ENGINE=InnoDB;
887
888CREATE TABLE mtb_status (
889    id smallint,
890    name text,
891    rank smallint NOT NULL DEFAULT 0,
892    PRIMARY KEY (id)
893) ENGINE=InnoDB;
894
895CREATE TABLE mtb_status_image (
896    id smallint,
897    name text,
898    rank smallint NOT NULL DEFAULT 0,
899    PRIMARY KEY (id)
900) ENGINE=InnoDB;
901
902CREATE TABLE mtb_allowed_tag (
903    id smallint,
904    name text,
905    rank smallint NOT NULL DEFAULT 0,
906    PRIMARY KEY (id)
907) ENGINE=InnoDB;
908
909CREATE TABLE mtb_page_max (
910    id smallint,
911    name text,
912    rank smallint NOT NULL DEFAULT 0,
913    PRIMARY KEY (id)
914) ENGINE=InnoDB;
915
916CREATE TABLE mtb_magazine_type (
917    id smallint,
918    name text,
919    rank smallint NOT NULL DEFAULT 0,
920    PRIMARY KEY (id)
921) ENGINE=InnoDB;
922
923CREATE TABLE mtb_mail_magazine_type (
924    id smallint,
925    name text,
926    rank smallint NOT NULL DEFAULT 0,
927    PRIMARY KEY (id)
928) ENGINE=InnoDB;
929
930CREATE TABLE mtb_recommend (
931    id smallint,
932    name text,
933    rank smallint NOT NULL DEFAULT 0,
934    PRIMARY KEY (id)
935) ENGINE=InnoDB;
936
937CREATE TABLE mtb_taxrule (
938    id smallint,
939    name text,
940    rank smallint NOT NULL DEFAULT 0,
941    PRIMARY KEY (id)
942) ENGINE=InnoDB;
943
944CREATE TABLE mtb_mail_template (
945    id smallint,
946    name text,
947    rank smallint NOT NULL DEFAULT 0,
948    PRIMARY KEY (id)
949) ENGINE=InnoDB;
950
951CREATE TABLE mtb_mail_tpl_path (
952    id smallint,
953    name text,
954    rank smallint NOT NULL DEFAULT 0,
955    PRIMARY KEY (id)
956) ENGINE=InnoDB;
957
958CREATE TABLE mtb_job (
959    id smallint,
960    name text,
961    rank smallint NOT NULL DEFAULT 0,
962    PRIMARY KEY (id)
963) ENGINE=InnoDB;
964
965CREATE TABLE mtb_reminder (
966    id smallint,
967    name text,
968    rank smallint NOT NULL DEFAULT 0,
969    PRIMARY KEY (id)
970) ENGINE=InnoDB;
971
972CREATE TABLE mtb_sex (
973    id smallint,
974    name text,
975    rank smallint NOT NULL DEFAULT 0,
976    PRIMARY KEY (id)
977) ENGINE=InnoDB;
978
979CREATE TABLE mtb_customer_status (
980    id smallint,
981    name text,
982    rank smallint NOT NULL DEFAULT 0,
983    PRIMARY KEY (id)
984) ENGINE=InnoDB;
985
986CREATE TABLE mtb_mail_type (
987    id smallint,
988    name text,
989    rank smallint NOT NULL DEFAULT 0,
990    PRIMARY KEY (id)
991) ENGINE=InnoDB;
992
993CREATE TABLE mtb_order_status (
994    id smallint,
995    name text,
996    rank smallint NOT NULL DEFAULT 0,
997    PRIMARY KEY (id)
998) ENGINE=InnoDB;
999
1000CREATE TABLE mtb_product_status_color (
1001    id smallint,
1002    name text,
1003    rank smallint NOT NULL DEFAULT 0,
1004    PRIMARY KEY (id)
1005) ENGINE=InnoDB;
1006
1007CREATE TABLE mtb_order_status_color (
1008    id smallint,
1009    name text,
1010    rank smallint NOT NULL DEFAULT 0,
1011    PRIMARY KEY (id)
1012) ENGINE=InnoDB;
1013
1014CREATE TABLE mtb_wday (
1015    id smallint,
1016    name text,
1017    rank smallint NOT NULL DEFAULT 0,
1018    PRIMARY KEY (id)
1019) ENGINE=InnoDB;
1020
1021CREATE TABLE mtb_delivery_date (
1022    id smallint,
1023    name text,
1024    rank smallint NOT NULL DEFAULT 0,
1025    PRIMARY KEY (id)
1026) ENGINE=InnoDB;
1027
1028CREATE TABLE mtb_product_list_max (
1029    id smallint,
1030    name text,
1031    rank smallint NOT NULL DEFAULT 0,
1032    PRIMARY KEY (id)
1033) ENGINE=InnoDB;
1034
1035CREATE TABLE mtb_convenience (
1036    id smallint,
1037    name text,
1038    rank smallint NOT NULL DEFAULT 0,
1039    PRIMARY KEY (id)
1040) ENGINE=InnoDB;
1041
1042CREATE TABLE mtb_conveni_message (
1043    id smallint,
1044    name text,
1045    rank smallint NOT NULL DEFAULT 0,
1046    PRIMARY KEY (id)
1047) ENGINE=InnoDB;
1048
1049CREATE TABLE mtb_db (
1050    id smallint,
1051    name text,
1052    rank smallint NOT NULL DEFAULT 0,
1053    PRIMARY KEY (id)
1054) ENGINE=InnoDB;
1055
1056CREATE TABLE mtb_target (
1057    id smallint,
1058    name text,
1059    rank smallint NOT NULL DEFAULT 0,
1060    PRIMARY KEY (id)
1061) ENGINE=InnoDB;
1062
1063CREATE TABLE mtb_review_deny_url (
1064    id smallint,
1065    name text,
1066    rank smallint NOT NULL DEFAULT 0,
1067    PRIMARY KEY (id)
1068) ENGINE=InnoDB;
1069
1070CREATE TABLE mtb_mobile_domain (
1071    id smallint,
1072    name text,
1073    rank smallint NOT NULL DEFAULT 0,
1074    PRIMARY KEY (id)
1075) ENGINE=InnoDB;
1076
1077CREATE TABLE mtb_ownersstore_err (
1078    id smallint,
1079    name text,
1080    rank smallint NOT NULL DEFAULT 0,
1081    PRIMARY KEY (id)
1082) ENGINE=InnoDB;
1083
1084CREATE TABLE mtb_ownersstore_ips (
1085    id smallint,
1086    name text,
1087    rank smallint NOT NULL DEFAULT 0,
1088    PRIMARY KEY (id)
1089) ENGINE=InnoDB;
1090
1091CREATE TABLE mtb_constants (
1092    id text,
1093    name text,
1094    rank smallint NOT NULL DEFAULT 0,
1095    remarks text,
1096    PRIMARY KEY (id(64))
1097) ENGINE=InnoDB;
1098
1099CREATE TABLE mtb_product_type (
1100    id smallint,
1101    name text,
1102    rank smallint NOT NULL,
1103    PRIMARY KEY (id)
1104) ENGINE=InnoDB;
1105
1106CREATE TABLE mtb_device_type (
1107    id smallint,
1108    name text,
1109    rank smallint NOT NULL,
1110    PRIMARY KEY (id)
1111) ENGINE=InnoDB;
1112
1113CREATE TABLE dtb_mobile_ext_session_id (
1114    session_id text NOT NULL,
1115    param_key text,
1116    param_value text,
1117    url text,
1118    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
1119);
1120
1121CREATE TABLE dtb_module (
1122    module_id int NOT NULL UNIQUE,
1123    module_code text NOT NULL,
1124    module_name text NOT NULL,
1125    sub_data text,
1126    auto_update_flg smallint NOT NULL DEFAULT 0,
1127    del_flg smallint NOT NULL DEFAULT 0,
1128    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1129    update_date timestamp NOT NULL
1130) ENGINE=InnoDB;
1131
1132CREATE TABLE dtb_session (
1133    sess_id varchar(50) NOT NULL,
1134    sess_data text,
1135    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1136    update_date timestamp NOT NULL,
1137    PRIMARY KEY (sess_id)
1138) ENGINE=InnoDB;
1139
1140CREATE TABLE dtb_bkup (
1141    bkup_name varchar(50),
1142    bkup_memo text,
1143    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1144    PRIMARY KEY (bkup_name)
1145) ENGINE=InnoDB;
1146
1147CREATE TABLE dtb_plugin (
1148    plugin_id int NOT NULL,
1149    plugin_name varchar(255) NOT NULL DEFAULT '',
1150    plugin_code varchar(255) NOT NULL,
1151    author varchar(255) NOT NULL DEFAULT '',
1152    plugin_site_url varchar(255) NOT NULL DEFAULT '',
1153    plugin_version varchar(255) NOT NULL DEFAULT '',
1154    plugin_description varchar(255) NOT NULL DEFAULT '',
1155    plugin_setting_path varchar(255) NOT NULL DEFAULT '',
1156    class_name varchar(255) NOT NULL DEFAULT '',
1157    status smallint NOT NULL DEFAULT 0,
1158    enable smallint NOT NULL DEFAULT 0,
1159    del_flg smallint NOT NULL DEFAULT 0,
1160    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1161    update_date timestamp NOT NULL,
1162    PRIMARY KEY (plugin_id)
1163) ENGINE=InnoDB;
1164
1165CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
1166CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1167CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1168CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1169CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
1170CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
1171CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
1172CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1173
1174CREATE TABLE dtb_index_list (
1175    table_name varchar(30) NOT NULL DEFAULT '',
1176    column_name varchar(30) NOT NULL DEFAULT '',
1177    recommend_flg smallint NOT NULL DEFAULT 0,
1178    recommend_comment text,
1179    PRIMARY KEY (table_name, column_name)
1180) ENGINE=InnoDB;
Note: See TracBrowser for help on using the repository browser.