source: branches/version-2_13-dev/html/install/sql/create_table_mysql.sql @ 22974

Revision 22974, 29.5 KB checked in by AMUAMU, 8 years ago (diff)

#1730 (税率変更に対応できない)
#2191 (税率対応に向けて、税率管理画面を作成する)
#2235 (越境ECを想定した機能の追加)
関係の修正一部

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