source: branches/version-2_12-dev/html/install/sql/create_table_mysql.sql @ 21455

Revision 21455, 28.6 KB checked in by h_yoshimoto, 12 years ago (diff)

#1603 #1632 プラグインの管理画面を作成しました。それに伴うエンジン部分の修正。

  • 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    PRIMARY KEY (template_id)
226) ENGINE=InnoDB;
227
228CREATE TABLE dtb_mailmaga_template (
229    template_id int NOT NULL,
230    subject text,
231    mail_method int,
232    body text,
233    del_flg smallint NOT NULL DEFAULT 0,
234    creator_id int NOT NULL,
235    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
236    update_date timestamp NOT NULL,
237    PRIMARY KEY (template_id)
238) ENGINE=InnoDB;
239
240CREATE TABLE dtb_send_history (
241    send_id int  NOT NULL,
242    mail_method smallint,
243    subject text,
244    body text,
245    send_count int,
246    complete_count int NOT NULL DEFAULT 0,
247    start_date datetime,
248    end_date datetime,
249    search_data text,
250    del_flg smallint NOT NULL DEFAULT 0,
251    creator_id int NOT NULL,
252    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
253    update_date timestamp NOT NULL,
254    PRIMARY KEY (send_id)
255) ENGINE=InnoDB;
256
257CREATE TABLE dtb_send_customer (
258    customer_id int,
259    send_id int NOT NULL,
260    email text,
261    name text,
262    send_flag smallint,
263    PRIMARY KEY (send_id, customer_id)
264) ENGINE=InnoDB;
265
266CREATE TABLE dtb_products (
267    product_id int  NOT NULL,
268    name text NOT NULL,
269    maker_id int,
270    status smallint NOT NULL DEFAULT 2,
271    comment1 text,
272    comment2 text,
273    comment3 mediumtext,
274    comment4 text,
275    comment5 text,
276    comment6 text,
277    note text,
278    main_list_comment text,
279    main_list_image text,
280    main_comment mediumtext,
281    main_image text,
282    main_large_image text,
283    sub_title1 text,
284    sub_comment1 mediumtext,
285    sub_image1 text,
286    sub_large_image1 text,
287    sub_title2 text,
288    sub_comment2 mediumtext,
289    sub_image2 text,
290    sub_large_image2 text,
291    sub_title3 text,
292    sub_comment3 mediumtext,
293    sub_image3 text,
294    sub_large_image3 text,
295    sub_title4 text,
296    sub_comment4 mediumtext,
297    sub_image4 text,
298    sub_large_image4 text,
299    sub_title5 text,
300    sub_comment5 mediumtext,
301    sub_image5 text,
302    sub_large_image5 text,
303    sub_title6 text,
304    sub_comment6 mediumtext,
305    sub_image6 text,
306    sub_large_image6 text,
307    del_flg smallint NOT NULL DEFAULT 0,
308    creator_id int NOT NULL,
309    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
310    update_date timestamp NOT NULL,
311    deliv_date_id int,
312    PRIMARY KEY (product_id)
313) ENGINE=InnoDB;
314
315CREATE TABLE dtb_products_class (
316    product_class_id int  NOT NULL,
317    product_id int NOT NULL,
318    class_combination_id int,
319    product_type_id int NOT NULL DEFAULT 0,
320    product_code text,
321    stock numeric,
322    stock_unlimited smallint NOT NULL DEFAULT 0,
323    sale_limit numeric,
324    price01 numeric,
325    price02 numeric NOT NULL,
326    deliv_fee numeric,
327    point_rate numeric,
328    creator_id int NOT NULL,
329    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
330    update_date timestamp NOT NULL,
331    down_filename text,
332    down_realfilename text,
333    del_flg smallint NOT NULL DEFAULT 0,
334    PRIMARY KEY (product_class_id)
335) ENGINE=InnoDB;
336
337CREATE TABLE dtb_class (
338    class_id int  NOT NULL,
339    name text,
340    rank int,
341    creator_id int NOT NULL,
342    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
343    update_date timestamp NOT NULL,
344    del_flg smallint NOT NULL DEFAULT 0,
345    PRIMARY KEY (class_id)
346) ENGINE=InnoDB;
347
348CREATE TABLE dtb_classcategory (
349    classcategory_id int  NOT NULL,
350    name text,
351    class_id int NOT NULL,
352    rank int,
353    creator_id int NOT NULL,
354    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
355    update_date timestamp NOT NULL,
356    del_flg smallint NOT NULL DEFAULT 0,
357    PRIMARY KEY (classcategory_id)
358) ENGINE=InnoDB;
359
360CREATE TABLE dtb_class_combination (
361    class_combination_id int NOT NULL,
362    parent_class_combination_id int,
363    classcategory_id int NOT NULL,
364    level int,
365    PRIMARY KEY(class_combination_id)
366) ENGINE=InnoDB;
367
368CREATE TABLE dtb_category (
369    category_id int  NOT NULL,
370    category_name text,
371    parent_category_id int NOT NULL DEFAULT 0,
372    level int NOT NULL,
373    rank int,
374    creator_id int NOT NULL,
375    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
376    update_date timestamp NOT NULL,
377    del_flg smallint NOT NULL DEFAULT 0,
378    PRIMARY KEY (category_id)
379) ENGINE=InnoDB;
380
381CREATE TABLE dtb_product_categories (
382    product_id int NOT NULL,
383    category_id int NOT NULL,
384    rank int NOT NULL,
385    PRIMARY KEY(product_id, category_id)
386) ENGINE=InnoDB;
387
388CREATE TABLE dtb_product_status (
389    product_status_id smallint NOT NULL,
390    product_id int NOT NULL,
391    creator_id int NOT NULL,
392    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
393    update_date timestamp NOT NULL,
394    del_flg smallint NOT NULL DEFAULT 0,
395    PRIMARY KEY(product_status_id, product_id)
396) ENGINE=InnoDB;
397
398CREATE TABLE dtb_recommend_products (
399    product_id int NOT NULL,
400    recommend_product_id int NOT NULL,
401    rank int NOT NULL,
402    comment text,
403    status smallint NOT NULL DEFAULT 0,
404    creator_id int NOT NULL,
405    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
406    update_date timestamp NOT NULL
407) ENGINE=InnoDB;
408
409CREATE TABLE dtb_review (
410    review_id int  NOT NULL,
411    product_id int NOT NULL,
412    reviewer_name text NOT NULL,
413    reviewer_url text,
414    sex smallint,
415    customer_id int,
416    recommend_level smallint NOT NULL,
417    title text NOT NULL,
418    comment text NOT NULL,
419    status smallint DEFAULT 2,
420    creator_id int NOT NULL,
421    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
422    update_date timestamp NOT NULL,
423    del_flg smallint NOT NULL DEFAULT 0,
424    PRIMARY KEY (review_id)
425) ENGINE=InnoDB;
426
427CREATE TABLE dtb_customer_favorite_products (
428    customer_id int NOT NULL,
429    product_id int NOT NULL,
430    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
431    update_date timestamp NOT NULL,
432    PRIMARY KEY (customer_id, product_id)
433) ENGINE=InnoDB;
434
435CREATE TABLE dtb_category_count (
436    category_id int NOT NULL,
437    product_count int NOT NULL,
438    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
439) ENGINE=InnoDB;
440
441CREATE TABLE dtb_category_total_count (
442    category_id int NOT NULL,
443    product_count int,
444    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
445) ENGINE=InnoDB;
446
447CREATE TABLE dtb_news (
448    news_id int  NOT NULL,
449    news_date datetime,
450    rank int,
451    news_title text NOT NULL,
452    news_comment text,
453    news_url text,
454    news_select smallint NOT NULL DEFAULT 0,
455    link_method text,
456    creator_id int NOT NULL,
457    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
458    update_date timestamp NOT NULL,
459    del_flg smallint NOT NULL DEFAULT 0,
460    PRIMARY KEY (news_id)
461) ENGINE=InnoDB;
462
463CREATE TABLE dtb_best_products (
464    best_id int  NOT NULL,
465    category_id int NOT NULL,
466    rank int NOT NULL DEFAULT 0,
467    product_id int NOT NULL,
468    title text,
469    comment text,
470    creator_id int NOT NULL,
471    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
472    update_date timestamp NOT NULL,
473    del_flg smallint NOT NULL DEFAULT 0,
474    PRIMARY KEY (best_id)
475) ENGINE=InnoDB;
476
477CREATE TABLE dtb_mail_history (
478    send_id int  NOT NULL,
479    order_id int NOT NULL,
480    send_date datetime,
481    template_id int,
482    creator_id int NOT NULL,
483    subject text,
484    mail_body text,
485    PRIMARY KEY (send_id)
486) ENGINE=InnoDB;
487
488CREATE TABLE dtb_customer (
489    customer_id int  NOT NULL,
490    name01 text NOT NULL,
491    name02 text NOT NULL,
492    kana01 text NOT NULL,
493    kana02 text NOT NULL,
494    zip01 text,
495    zip02 text,
496    pref smallint,
497    addr01 text,
498    addr02 text,
499    email text NOT NULL,
500    email_mobile text,
501    tel01 text,
502    tel02 text,
503    tel03 text,
504    fax01 text,
505    fax02 text,
506    fax03 text,
507    sex smallint,
508    job smallint,
509    birth datetime,
510    password text,
511    reminder smallint,
512    reminder_answer text,
513    salt text,
514    secret_key varchar(50) NOT NULL UNIQUE,
515    first_buy_date datetime,
516    last_buy_date datetime,
517    buy_times numeric DEFAULT 0,
518    buy_total numeric DEFAULT 0,
519    point numeric DEFAULT 0,
520    note text,
521    status smallint NOT NULL DEFAULT 1,
522    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
523    update_date timestamp NOT NULL,
524    del_flg smallint NOT NULL DEFAULT 0,
525    mobile_phone_id text,
526    mailmaga_flg smallint,
527    PRIMARY KEY (customer_id)
528) ENGINE=InnoDB;
529
530CREATE TABLE dtb_order (
531    order_id int  NOT NULL,
532    order_temp_id text,
533    customer_id int NOT NULL,
534    message text,
535    order_name01 text,
536    order_name02 text,
537    order_kana01 text,
538    order_kana02 text,
539    order_email text,
540    order_tel01 text,
541    order_tel02 text,
542    order_tel03 text,
543    order_fax01 text,
544    order_fax02 text,
545    order_fax03 text,
546    order_zip01 text,
547    order_zip02 text,
548    order_pref smallint,
549    order_addr01 text,
550    order_addr02 text,
551    order_sex smallint,
552    order_birth datetime,
553    order_job int,
554    subtotal numeric,
555    discount numeric,
556    deliv_id int,
557    deliv_fee numeric,
558    charge numeric,
559    use_point numeric,
560    add_point numeric,
561    birth_point numeric DEFAULT 0,
562    tax numeric,
563    total numeric,
564    payment_total numeric,
565    payment_id int,
566    payment_method text,
567    note text,
568    status smallint,
569    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
570    update_date timestamp NOT NULL,
571    commit_date datetime,
572    payment_date datetime,
573    device_type_id int,
574    del_flg smallint NOT NULL DEFAULT 0,
575    memo01 text,
576    memo02 text,
577    memo03 text,
578    memo04 text,
579    memo05 text,
580    memo06 text,
581    memo07 text,
582    memo08 text,
583    memo09 text,
584    memo10 text,
585    PRIMARY KEY (order_id)
586) ENGINE=InnoDB;
587
588CREATE TABLE dtb_order_temp (
589    order_temp_id text NOT NULL,
590    customer_id int NOT NULL,
591    message text,
592    order_name01 text,
593    order_name02 text,
594    order_kana01 text,
595    order_kana02 text,
596    order_email text,
597    order_tel01 text,
598    order_tel02 text,
599    order_tel03 text,
600    order_fax01 text,
601    order_fax02 text,
602    order_fax03 text,
603    order_zip01 text,
604    order_zip02 text,
605    order_pref smallint,
606    order_addr01 text,
607    order_addr02 text,
608    order_sex smallint,
609    order_birth datetime,
610    order_job int,
611    subtotal numeric,
612    discount numeric,
613    deliv_id int,
614    deliv_fee numeric,
615    charge numeric,
616    use_point numeric,
617    add_point numeric,
618    birth_point numeric DEFAULT 0,
619    tax numeric,
620    total numeric,
621    payment_total numeric,
622    payment_id int,
623    payment_method text,
624    note text,
625    mail_flag smallint,
626    status smallint,
627    deliv_check smallint,
628    point_check smallint,
629    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
630    update_date timestamp NOT NULL,
631    device_type_id int,
632    del_flg smallint NOT NULL DEFAULT 0,
633    order_id int,
634    memo01 text,
635    memo02 text,
636    memo03 text,
637    memo04 text,
638    memo05 text,
639    memo06 text,
640    memo07 text,
641    memo08 text,
642    memo09 text,
643    memo10 text,
644    session text
645) ENGINE=InnoDB;
646
647CREATE TABLE dtb_shipping (
648    shipping_id int NOT NULL,
649    order_id int NOT NULL,
650    shipping_name01 text,
651    shipping_name02 text,
652    shipping_kana01 text,
653    shipping_kana02 text,
654    shipping_tel01 text,
655    shipping_tel02 text,
656    shipping_tel03 text,
657    shipping_fax01 text,
658    shipping_fax02 text,
659    shipping_fax03 text,
660    shipping_pref smallint,
661    shipping_zip01 text,
662    shipping_zip02 text,
663    shipping_addr01 text,
664    shipping_addr02 text,
665    deliv_id int NOT NULL,
666    time_id int,
667    shipping_time text,
668    shipping_num text,
669    shipping_date datetime,
670    shipping_commit_date datetime,
671    rank int,
672    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
673    update_date timestamp NOT NULL,
674    del_flg smallint NOT NULL DEFAULT 0,
675    PRIMARY KEY (shipping_id, order_id)
676) ENGINE=InnoDB;
677
678CREATE TABLE dtb_shipment_item (
679    shipping_id int NOT NULL,
680    product_class_id int NOT NULL,
681    order_id int NOT NULL,
682    product_name text NOT NULL,
683    product_code text,
684    classcategory_name1 text,
685    classcategory_name2 text,
686    price numeric,
687    quantity numeric,
688    PRIMARY KEY (shipping_id, product_class_id, order_id)
689) ENGINE=InnoDB;
690
691CREATE TABLE dtb_other_deliv (
692    other_deliv_id int  NOT NULL,
693    customer_id int NOT NULL,
694    name01 text,
695    name02 text,
696    kana01 text,
697    kana02 text,
698    zip01 text,
699    zip02 text,
700    pref smallint,
701    addr01 text,
702    addr02 text,
703    tel01 text,
704    tel02 text,
705    tel03 text,
706    PRIMARY KEY (other_deliv_id)
707) ENGINE=InnoDB;
708
709CREATE TABLE dtb_order_detail (
710    order_detail_id int NOT NULL,
711    order_id int NOT NULL,
712    product_id int NOT NULL,
713    product_class_id int NOT NULL,
714    product_name text NOT NULL,
715    product_code text,
716    classcategory_name1 text,
717    classcategory_name2 text,
718    price numeric,
719    quantity numeric,
720    point_rate numeric,
721    PRIMARY KEY (order_detail_id)
722) ENGINE=InnoDB;
723
724CREATE TABLE dtb_member (
725    member_id int  NOT NULL,
726    name text,
727    department text,
728    login_id text NOT NULL,
729    password text NOT NULL,
730    salt text NOT NULL,
731    authority smallint NOT NULL,
732    rank int NOT NULL DEFAULT 0,
733    work smallint NOT NULL DEFAULT 1,
734    del_flg smallint NOT NULL DEFAULT 0,
735    creator_id int NOT NULL,
736    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
737    update_date timestamp NOT NULL,
738    login_date datetime,
739    PRIMARY KEY (member_id)
740) ENGINE=InnoDB;
741
742CREATE TABLE dtb_pagelayout (
743    device_type_id int NOT NULL,
744    page_id int  NOT NULL,
745    page_name text,
746    url text NOT NULL,
747    filename text,
748    header_chk smallint DEFAULT 1,
749    footer_chk smallint DEFAULT 1,
750    edit_flg smallint DEFAULT 1,
751    author text,
752    description text,
753    keyword text,
754    update_url text,
755    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
756    update_date timestamp NOT NULL,
757    PRIMARY KEY (device_type_id, page_id)
758) ENGINE=InnoDB;
759
760CREATE TABLE dtb_bloc (
761    device_type_id int NOT NULL,
762    bloc_id int  NOT NULL,
763    bloc_name text,
764    tpl_path text,
765    filename varchar(50) NOT NULL,
766    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
767    update_date timestamp NOT NULL,
768    php_path text,
769    deletable_flg smallint NOT NULL DEFAULT 1,
770    PRIMARY KEY (device_type_id, bloc_id),
771    UNIQUE (device_type_id, filename)
772) ENGINE=InnoDB;
773
774CREATE TABLE dtb_blocposition (
775    device_type_id int NOT NULL,
776    page_id int NOT NULL,
777    target_id int NOT NULL,
778    bloc_id int NOT NULL,
779    bloc_row int,
780    anywhere smallint DEFAULT 0 NOT NULL,
781    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
782) ENGINE=InnoDB;
783
784CREATE TABLE dtb_csv (
785    no int,
786    csv_id int NOT NULL,
787    col text,
788    disp_name text,
789    rank int,
790    rw_flg smallint DEFAULT 1,
791    status smallint NOT NULL DEFAULT 1,
792    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
793    update_date timestamp NOT NULL,
794    mb_convert_kana_option text,
795    size_const_type text,
796    error_check_types text,
797    PRIMARY KEY (no)
798) ENGINE=InnoDB;
799
800CREATE TABLE dtb_csv_sql (
801    sql_id int,
802    sql_name text NOT NULL,
803    csv_sql text,
804    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
805    update_date timestamp NOT NULL,
806    PRIMARY KEY (sql_id)
807) ENGINE=InnoDB;
808
809CREATE TABLE dtb_templates (
810    template_code varchar(50) NOT NULL,
811    device_type_id int NOT NULL,
812    template_name text,
813    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
814    update_date timestamp NOT NULL,
815    PRIMARY KEY (template_code)
816) ENGINE=InnoDB;
817
818CREATE TABLE dtb_maker (
819    maker_id int NOT NULL,
820    name text NOT NULL,
821    rank int NOT NULL DEFAULT 0,
822    creator_id int NOT NULL,
823    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
824    update_date timestamp NOT NULL,
825    del_flg smallint NOT NULL DEFAULT 0,
826    PRIMARY KEY (maker_id)
827) ENGINE=InnoDB;
828
829CREATE TABLE dtb_maker_count (
830    maker_id int NOT NULL,
831    product_count int NOT NULL,
832    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
833) ENGINE=InnoDB;
834
835CREATE TABLE mtb_pref (
836    id smallint,
837    name text,
838    rank smallint NOT NULL DEFAULT 0,
839    PRIMARY KEY (id)
840) ENGINE=InnoDB;
841
842CREATE TABLE mtb_permission (
843    id text,
844    name text,
845    rank smallint NOT NULL DEFAULT 0,
846    PRIMARY KEY (id(32))
847) ENGINE=InnoDB;
848
849CREATE TABLE mtb_disable_logout (
850    id smallint,
851    name text,
852    rank smallint NOT NULL DEFAULT 0,
853    PRIMARY KEY (id)
854) ENGINE=InnoDB;
855
856CREATE TABLE mtb_authority (
857    id smallint,
858    name text,
859    rank smallint NOT NULL DEFAULT 0,
860    PRIMARY KEY (id)
861) ENGINE=InnoDB;
862
863CREATE TABLE mtb_auth_excludes (
864    id smallint,
865    name text,
866    rank smallint NOT NULL DEFAULT 0,
867    PRIMARY KEY (id)
868) ENGINE=InnoDB;
869
870CREATE TABLE mtb_work (
871    id smallint,
872    name text,
873    rank smallint NOT NULL DEFAULT 0,
874    PRIMARY KEY (id)
875) ENGINE=InnoDB;
876
877CREATE TABLE mtb_disp (
878    id smallint,
879    name text,
880    rank smallint NOT NULL DEFAULT 0,
881    PRIMARY KEY (id)
882) ENGINE=InnoDB;
883
884CREATE TABLE mtb_class (
885    id smallint,
886    name text,
887    rank smallint NOT NULL DEFAULT 0,
888    PRIMARY KEY (id)
889) ENGINE=InnoDB;
890
891CREATE TABLE mtb_status (
892    id smallint,
893    name text,
894    rank smallint NOT NULL DEFAULT 0,
895    PRIMARY KEY (id)
896) ENGINE=InnoDB;
897
898CREATE TABLE mtb_status_image (
899    id smallint,
900    name text,
901    rank smallint NOT NULL DEFAULT 0,
902    PRIMARY KEY (id)
903) ENGINE=InnoDB;
904
905CREATE TABLE mtb_allowed_tag (
906    id smallint,
907    name text,
908    rank smallint NOT NULL DEFAULT 0,
909    PRIMARY KEY (id)
910) ENGINE=InnoDB;
911
912CREATE TABLE mtb_page_max (
913    id smallint,
914    name text,
915    rank smallint NOT NULL DEFAULT 0,
916    PRIMARY KEY (id)
917) ENGINE=InnoDB;
918
919CREATE TABLE mtb_magazine_type (
920    id smallint,
921    name text,
922    rank smallint NOT NULL DEFAULT 0,
923    PRIMARY KEY (id)
924) ENGINE=InnoDB;
925
926CREATE TABLE mtb_mail_magazine_type (
927    id smallint,
928    name text,
929    rank smallint NOT NULL DEFAULT 0,
930    PRIMARY KEY (id)
931) ENGINE=InnoDB;
932
933CREATE TABLE mtb_recommend (
934    id smallint,
935    name text,
936    rank smallint NOT NULL DEFAULT 0,
937    PRIMARY KEY (id)
938) ENGINE=InnoDB;
939
940CREATE TABLE mtb_taxrule (
941    id smallint,
942    name text,
943    rank smallint NOT NULL DEFAULT 0,
944    PRIMARY KEY (id)
945) ENGINE=InnoDB;
946
947CREATE TABLE mtb_mail_template (
948    id smallint,
949    name text,
950    rank smallint NOT NULL DEFAULT 0,
951    PRIMARY KEY (id)
952) ENGINE=InnoDB;
953
954CREATE TABLE mtb_mail_tpl_path (
955    id smallint,
956    name text,
957    rank smallint NOT NULL DEFAULT 0,
958    PRIMARY KEY (id)
959) ENGINE=InnoDB;
960
961CREATE TABLE mtb_job (
962    id smallint,
963    name text,
964    rank smallint NOT NULL DEFAULT 0,
965    PRIMARY KEY (id)
966) ENGINE=InnoDB;
967
968CREATE TABLE mtb_reminder (
969    id smallint,
970    name text,
971    rank smallint NOT NULL DEFAULT 0,
972    PRIMARY KEY (id)
973) ENGINE=InnoDB;
974
975CREATE TABLE mtb_sex (
976    id smallint,
977    name text,
978    rank smallint NOT NULL DEFAULT 0,
979    PRIMARY KEY (id)
980) ENGINE=InnoDB;
981
982CREATE TABLE mtb_customer_status (
983    id smallint,
984    name text,
985    rank smallint NOT NULL DEFAULT 0,
986    PRIMARY KEY (id)
987) ENGINE=InnoDB;
988
989CREATE TABLE mtb_mail_type (
990    id smallint,
991    name text,
992    rank smallint NOT NULL DEFAULT 0,
993    PRIMARY KEY (id)
994) ENGINE=InnoDB;
995
996CREATE TABLE mtb_order_status (
997    id smallint,
998    name text,
999    rank smallint NOT NULL DEFAULT 0,
1000    PRIMARY KEY (id)
1001) ENGINE=InnoDB;
1002
1003CREATE TABLE mtb_product_status_color (
1004    id smallint,
1005    name text,
1006    rank smallint NOT NULL DEFAULT 0,
1007    PRIMARY KEY (id)
1008) ENGINE=InnoDB;
1009
1010CREATE TABLE mtb_order_status_color (
1011    id smallint,
1012    name text,
1013    rank smallint NOT NULL DEFAULT 0,
1014    PRIMARY KEY (id)
1015) ENGINE=InnoDB;
1016
1017CREATE TABLE mtb_wday (
1018    id smallint,
1019    name text,
1020    rank smallint NOT NULL DEFAULT 0,
1021    PRIMARY KEY (id)
1022) ENGINE=InnoDB;
1023
1024CREATE TABLE mtb_delivery_date (
1025    id smallint,
1026    name text,
1027    rank smallint NOT NULL DEFAULT 0,
1028    PRIMARY KEY (id)
1029) ENGINE=InnoDB;
1030
1031CREATE TABLE mtb_product_list_max (
1032    id smallint,
1033    name text,
1034    rank smallint NOT NULL DEFAULT 0,
1035    PRIMARY KEY (id)
1036) ENGINE=InnoDB;
1037
1038CREATE TABLE mtb_db (
1039    id smallint,
1040    name text,
1041    rank smallint NOT NULL DEFAULT 0,
1042    PRIMARY KEY (id)
1043) ENGINE=InnoDB;
1044
1045CREATE TABLE mtb_target (
1046    id smallint,
1047    name text,
1048    rank smallint NOT NULL DEFAULT 0,
1049    PRIMARY KEY (id)
1050) ENGINE=InnoDB;
1051
1052CREATE TABLE mtb_review_deny_url (
1053    id smallint,
1054    name text,
1055    rank smallint NOT NULL DEFAULT 0,
1056    PRIMARY KEY (id)
1057) ENGINE=InnoDB;
1058
1059CREATE TABLE mtb_mobile_domain (
1060    id smallint,
1061    name text,
1062    rank smallint NOT NULL DEFAULT 0,
1063    PRIMARY KEY (id)
1064) ENGINE=InnoDB;
1065
1066CREATE TABLE mtb_ownersstore_err (
1067    id smallint,
1068    name text,
1069    rank smallint NOT NULL DEFAULT 0,
1070    PRIMARY KEY (id)
1071) ENGINE=InnoDB;
1072
1073CREATE TABLE mtb_ownersstore_ips (
1074    id smallint,
1075    name text,
1076    rank smallint NOT NULL DEFAULT 0,
1077    PRIMARY KEY (id)
1078) ENGINE=InnoDB;
1079
1080CREATE TABLE mtb_constants (
1081    id text,
1082    name text,
1083    rank smallint NOT NULL DEFAULT 0,
1084    remarks text,
1085    PRIMARY KEY (id(64))
1086) ENGINE=InnoDB;
1087
1088CREATE TABLE mtb_product_type (
1089    id smallint,
1090    name text,
1091    rank smallint NOT NULL,
1092    PRIMARY KEY (id)
1093) ENGINE=InnoDB;
1094
1095CREATE TABLE mtb_device_type (
1096    id smallint,
1097    name text,
1098    rank smallint NOT NULL,
1099    PRIMARY KEY (id)
1100) ENGINE=InnoDB;
1101
1102CREATE TABLE dtb_mobile_ext_session_id (
1103    session_id text NOT NULL,
1104    param_key text,
1105    param_value text,
1106    url text,
1107    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
1108) ENGINE=InnoDB;
1109
1110CREATE TABLE dtb_module (
1111    module_id int NOT NULL UNIQUE,
1112    module_code text NOT NULL,
1113    module_name text NOT NULL,
1114    sub_data text,
1115    auto_update_flg smallint NOT NULL DEFAULT 0,
1116    del_flg smallint NOT NULL DEFAULT 0,
1117    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1118    update_date timestamp NOT NULL
1119) ENGINE=InnoDB;
1120
1121CREATE TABLE dtb_session (
1122    sess_id varchar(50) NOT NULL,
1123    sess_data text,
1124    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1125    update_date timestamp NOT NULL,
1126    PRIMARY KEY (sess_id)
1127) ENGINE=InnoDB;
1128
1129CREATE TABLE dtb_bkup (
1130    bkup_name varchar(50),
1131    bkup_memo text,
1132    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1133    PRIMARY KEY (bkup_name)
1134) ENGINE=InnoDB;
1135
1136CREATE TABLE dtb_plugin (
1137    plugin_id int NOT NULL,
1138    plugin_name varchar(255) NOT NULL,
1139    plugin_code varchar(255) NOT NULL,
1140    author varchar(255),
1141    author_site_url varchar(255),
1142    plugin_site_url varchar(255),
1143    plugin_version varchar(255),
1144    compliant_version varchar(255),
1145    plugin_description varchar(255),
1146    rank int NOT NULL DEFAULT 0,
1147    enable smallint NOT NULL DEFAULT 0,
1148    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1149    update_date timestamp NOT NULL,
1150    PRIMARY KEY (plugin_id)
1151) ENGINE=InnoDB;
1152
1153CREATE TABLE dtb_plugin_hookpoint (
1154    plugin_id int NOT NULL,
1155    hook_point varchar(255) NOT NULL,
1156    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1157    update_date timestamp NOT NULL
1158) ENGINE=InnoDB;
1159
1160CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
1161CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1162CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1163CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1164CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
1165CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
1166CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
1167CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1168
1169CREATE TABLE dtb_index_list (
1170    table_name varchar(30) NOT NULL,
1171    column_name varchar(30) NOT NULL,
1172    recommend_flg smallint NOT NULL DEFAULT 0,
1173    recommend_comment text,
1174    PRIMARY KEY (table_name, column_name)
1175) ENGINE=InnoDB;
Note: See TracBrowser for help on using the repository browser.