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

Revision 21553, 27.0 KB checked in by Seasoft, 10 years ago (diff)

#1666 (create_table_*.sql 間の差異を減らす)

  • text 型のインデックス用の文字長は b-tree の構造からパフォーマンスには実質的な影響は無いと判断し 255 に統一している。(たしかこれが最大長。)

#1607 (未使用定義の削除)

  • dtb_shipping.deliv_id

#1625 (typo修正・ソース整形・ソースコメントの改善)

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