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

Revision 19986, 32.5 KB checked in by AMUAMU, 13 years ago (diff)

#818 (パスワードリマインダの答えのハッシュ暗号化) の解決
#819 (パスワードのハッシュ暗号化の強化) の解決
#335 (パスワードリマインダの改修) の準備修正
#895 (会員登録完了ページのタイトル異常) の解決
#899 (会員登録時にパスワードが正しく登録されない) の解決
#744 (PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり) 関連の修正も含む

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