source: branches/version-2_12-multilang/html/install/sql/create_table_mysql.sql @ 22205

Revision 22205, 28.7 KB checked in by m_uehara, 8 years ago (diff)

#2004 郵便番号を2カラムから1カラムに変更しました。

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