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

Revision 19958, 32.4 KB checked in by nanasess, 13 years ago (diff)

#793(非推奨機能の削除)

  • 動作を優先するため, r18786 の一部を差し戻し

#382(管理画面XHTMLに変更)

  • メルマガ管理画面を修正
  • 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    secret_key varchar(50) NOT NULL UNIQUE,
582    first_buy_date datetime,
583    last_buy_date datetime,
584    buy_times numeric DEFAULT 0,
585    buy_total numeric DEFAULT 0,
586    point numeric DEFAULT 0,
587    note text,
588    status smallint NOT NULL DEFAULT 1,
589    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
590    update_date timestamp NOT NULL,
591    del_flg smallint NOT NULL DEFAULT 0,
592    mobile_phone_id text,
593    mailmaga_flg smallint,
594    PRIMARY KEY (customer_id)
595) ENGINE=InnoDB;
596
597CREATE TABLE dtb_order (
598    order_id int  NOT NULL,
599    order_temp_id text,
600    customer_id int NOT NULL,
601    message text,
602    order_name01 text,
603    order_name02 text,
604    order_kana01 text,
605    order_kana02 text,
606    order_email text,
607    order_tel01 text,
608    order_tel02 text,
609    order_tel03 text,
610    order_fax01 text,
611    order_fax02 text,
612    order_fax03 text,
613    order_zip01 text,
614    order_zip02 text,
615    order_pref smallint,
616    order_addr01 text,
617    order_addr02 text,
618    order_sex smallint,
619    order_birth datetime,
620    order_job int,
621    subtotal numeric,
622    discount numeric,
623    deliv_fee numeric, 
624    charge numeric,
625    use_point numeric,
626    add_point numeric,
627    birth_point numeric DEFAULT 0,
628    tax numeric,
629    total numeric,
630    payment_total numeric,
631    payment_id int,
632    payment_method text,
633    note text,
634    status smallint,
635    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
636    update_date timestamp NOT NULL,
637    commit_date datetime,
638    payment_date datetime,
639    device_type_id int,
640    del_flg smallint NOT NULL DEFAULT 0,
641    memo01 text,
642    memo02 text,
643    memo03 text,
644    memo04 text,
645    memo05 text,
646    memo06 text,
647    memo07 text,
648    memo08 text,
649    memo09 text,
650    memo10 text,
651    PRIMARY KEY (order_id)
652) ENGINE=InnoDB;
653
654CREATE TABLE dtb_order_temp (
655    order_temp_id text NOT NULL,
656    customer_id int NOT NULL,
657    message text,
658    order_name01 text,
659    order_name02 text,
660    order_kana01 text,
661    order_kana02 text,
662    order_email text,
663    order_tel01 text,
664    order_tel02 text,
665    order_tel03 text,
666    order_fax01 text,
667    order_fax02 text,
668    order_fax03 text,
669    order_zip01 text,
670    order_zip02 text,
671    order_pref smallint,
672    order_addr01 text,
673    order_addr02 text,
674    order_sex smallint,
675    order_birth datetime,
676    order_job int,
677    subtotal numeric,
678    discount numeric,
679    deliv_fee numeric,
680    charge numeric,
681    use_point numeric,
682    add_point numeric,
683    birth_point numeric DEFAULT 0,
684    tax numeric,
685    total numeric,
686    payment_total numeric,
687    payment_id int,
688    payment_method text,
689    note text,
690    mail_flag smallint,
691    status smallint,
692    deliv_check smallint,
693    point_check smallint,
694    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
695    update_date timestamp NOT NULL,
696    device_type_id int,
697    del_flg smallint NOT NULL DEFAULT 0,
698    order_id int,
699    memo01 text,
700    memo02 text,
701    memo03 text,
702    memo04 text,
703    memo05 text,
704    memo06 text,
705    memo07 text,
706    memo08 text,
707    memo09 text,
708    memo10 text,
709    session text
710) ENGINE=InnoDB;
711
712CREATE TABLE dtb_shipping (
713    shipping_id int NOT NULL,
714    order_id int NOT NULL,
715    shipping_name01 text,
716    shipping_name02 text,
717    shipping_kana01 text,
718    shipping_kana02 text,
719    shipping_tel01 text,
720    shipping_tel02 text,
721    shipping_tel03 text,
722    shipping_fax01 text,
723    shipping_fax02 text,
724    shipping_fax03 text,
725    shipping_pref smallint,
726    shipping_zip01 text,
727    shipping_zip02 text,
728    shipping_addr01 text,
729    shipping_addr02 text,
730    deliv_id int NOT NULL,
731    time_id int,
732    shipping_time text,
733    shipping_num text,
734    shipping_date datetime,
735    shipping_commit_date datetime,
736    rank int,
737    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
738    update_date timestamp NOT NULL,
739    del_flg smallint NOT NULL DEFAULT 0,
740    PRIMARY KEY (shipping_id, order_id)
741) ENGINE=InnoDB;
742
743CREATE TABLE dtb_shipment_item (
744    shipping_id int NOT NULL,
745    product_class_id int NOT NULL,
746    order_id int NOT NULL,
747    product_name text NOT NULL,
748    product_code text,
749    classcategory_name1 text,
750    classcategory_name2 text,
751    price numeric,
752    quantity numeric,
753    PRIMARY KEY (shipping_id, product_class_id, order_id)
754) ENGINE=InnoDB;
755
756CREATE TABLE dtb_other_deliv (
757    other_deliv_id int  NOT NULL,
758    customer_id int NOT NULL,
759    name01 text,
760    name02 text,
761    kana01 text,
762    kana02 text,
763    zip01 text,
764    zip02 text,
765    pref smallint,
766    addr01 text,
767    addr02 text,
768    tel01 text,
769    tel02 text,
770    tel03 text,
771    PRIMARY KEY (other_deliv_id)
772) ENGINE=InnoDB;
773
774CREATE TABLE dtb_order_detail (
775    order_id int NOT NULL,
776    product_id int NOT NULL,
777    product_class_id int NOT NULL,
778    product_name text NOT NULL,
779    product_code text,
780    classcategory_name1 text,
781    classcategory_name2 text,
782    price numeric,
783    quantity numeric,
784    point_rate numeric
785) ENGINE=InnoDB;
786
787CREATE TABLE dtb_member (
788    member_id int  NOT NULL,
789    name text,
790    department text,
791    login_id text NOT NULL,
792    password text NOT NULL,
793    authority smallint NOT NULL,
794    rank int NOT NULL DEFAULT 0,
795    work smallint NOT NULL DEFAULT 1,
796    del_flg smallint NOT NULL DEFAULT 0,
797    creator_id int NOT NULL,
798    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
799    update_date timestamp NOT NULL,
800    login_date datetime,
801    PRIMARY KEY (member_id)
802) ENGINE=InnoDB;
803
804CREATE TABLE dtb_bat_relate_products (
805    product_id int,
806    relate_product_id int,
807    customer_id int,
808    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
809) ENGINE=InnoDB;
810
811CREATE TABLE dtb_pagelayout (
812    device_type_id int NOT NULL,
813    page_id int  NOT NULL,
814    page_name text,
815    url text NOT NULL,
816    php_dir text,
817    tpl_dir text,
818    filename text,
819    header_chk smallint DEFAULT 1,
820    footer_chk smallint DEFAULT 1,
821    edit_flg smallint DEFAULT 1,
822    author text,
823    description text,
824    keyword text,
825    update_url text,
826    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
827    update_date timestamp NOT NULL,
828    PRIMARY KEY (device_type_id, page_id)
829) ENGINE=InnoDB;
830
831CREATE TABLE dtb_bloc (
832    device_type_id int NOT NULL,
833    bloc_id int  NOT NULL,
834    bloc_name text,
835    tpl_path text,
836    filename varchar(50) NOT NULL,
837    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
838    update_date timestamp NOT NULL,
839    php_path text,
840    deletable_flg smallint NOT NULL DEFAULT 1,
841    PRIMARY KEY (device_type_id, bloc_id),
842    UNIQUE (device_type_id, filename)
843) ENGINE=InnoDB;
844
845CREATE TABLE dtb_blocposition (
846    device_type_id int NOT NULL,
847    page_id int NOT NULL,
848    target_id int NOT NULL,
849    bloc_id int NOT NULL,
850    bloc_row int,
851    anywhere smallint DEFAULT 0 NOT NULL,
852    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
853) ENGINE=InnoDB;
854
855CREATE TABLE dtb_csv (
856    no int,
857    csv_id int NOT NULL,
858    col text,
859    disp_name text,
860    rank int,
861    rw_flg smallint DEFAULT 1,
862    status smallint NOT NULL DEFAULT 1,
863    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
864    update_date timestamp NOT NULL,
865    mb_convert_kana_option text,
866    size_const_type text,
867    error_check_types text,
868    PRIMARY KEY (no)
869) ENGINE=InnoDB;
870
871CREATE TABLE dtb_csv_sql (
872    sql_id int,
873    sql_name text NOT NULL,
874    csv_sql text,
875    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
876    update_date timestamp NOT NULL,
877    PRIMARY KEY (sql_id)
878) ENGINE=InnoDB;
879
880CREATE TABLE dtb_templates (
881    template_code varchar(50) NOT NULL,
882    template_name text,
883    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
884    update_date timestamp NOT NULL,
885    PRIMARY KEY (template_code)
886) ENGINE=InnoDB;
887
888CREATE TABLE dtb_table_comment (
889    id int,
890    table_name text,
891    column_name text,
892    description text,
893    PRIMARY KEY (id)
894) ENGINE=InnoDB;
895
896CREATE TABLE dtb_maker (
897    maker_id int NOT NULL,
898    name text NOT NULL,
899    rank int NOT NULL DEFAULT 0,
900    creator_id int NOT NULL,
901    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
902    update_date timestamp NOT NULL,
903    del_flg smallint NOT NULL DEFAULT 0,
904    PRIMARY KEY (maker_id)
905) ENGINE=InnoDB;
906
907CREATE TABLE dtb_maker_count (
908    maker_id int NOT NULL,
909    product_count int NOT NULL,
910    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
911) ENGINE=InnoDB;
912
913CREATE TABLE mtb_pref (
914    id smallint NOT NULL,
915    name text,
916    rank smallint NOT NULL DEFAULT 0,
917    PRIMARY KEY (id)
918) ENGINE=InnoDB;
919
920CREATE TABLE mtb_permission (
921    id text,
922    name text,
923    rank smallint NOT NULL DEFAULT 0,
924    PRIMARY KEY (id(32))
925) ENGINE=InnoDB;
926
927CREATE TABLE mtb_disable_logout (
928    id smallint,
929    name text,
930    rank smallint NOT NULL DEFAULT 0,
931    PRIMARY KEY (id)
932) ENGINE=InnoDB;
933
934CREATE TABLE mtb_authority (
935    id smallint,
936    name text,
937    rank smallint NOT NULL DEFAULT 0,
938    PRIMARY KEY (id)
939) ENGINE=InnoDB;
940
941CREATE TABLE mtb_work (
942    id smallint,
943    name text,
944    rank smallint NOT NULL DEFAULT 0,
945    PRIMARY KEY (id)
946) ENGINE=InnoDB;
947
948CREATE TABLE mtb_disp (
949    id smallint,
950    name text,
951    rank smallint NOT NULL DEFAULT 0,
952    PRIMARY KEY (id)
953) ENGINE=InnoDB;
954
955CREATE TABLE mtb_class (
956    id smallint,
957    name text,
958    rank smallint NOT NULL DEFAULT 0,
959    PRIMARY KEY (id)
960) ENGINE=InnoDB;
961
962CREATE TABLE mtb_status (
963    id smallint,
964    name text,
965    rank smallint NOT NULL DEFAULT 0,
966    PRIMARY KEY (id)
967) ENGINE=InnoDB;
968
969CREATE TABLE mtb_status_image (
970    id smallint,
971    name text,
972    rank smallint NOT NULL DEFAULT 0,
973    PRIMARY KEY (id)
974) ENGINE=InnoDB;
975
976CREATE TABLE mtb_allowed_tag (
977    id smallint,
978    name text,
979    rank smallint NOT NULL DEFAULT 0,
980    PRIMARY KEY (id)
981) ENGINE=InnoDB;
982
983CREATE TABLE mtb_page_max (
984    id smallint,
985    name text,
986    rank smallint NOT NULL DEFAULT 0,
987    PRIMARY KEY (id)
988) ENGINE=InnoDB;
989
990CREATE TABLE mtb_magazine_type (
991    id smallint,
992    name text,
993    rank smallint NOT NULL DEFAULT 0,
994    PRIMARY KEY (id)
995) ENGINE=InnoDB;
996
997CREATE TABLE mtb_mail_magazine_type (
998    id smallint,
999    name text,
1000    rank smallint NOT NULL DEFAULT 0,
1001    PRIMARY KEY (id)
1002) ENGINE=InnoDB;
1003
1004CREATE TABLE mtb_recommend (
1005    id smallint,
1006    name text,
1007    rank smallint NOT NULL DEFAULT 0,
1008    PRIMARY KEY (id)
1009) ENGINE=InnoDB;
1010
1011CREATE TABLE mtb_taxrule (
1012    id smallint,
1013    name text,
1014    rank smallint NOT NULL DEFAULT 0,
1015    PRIMARY KEY (id)
1016) ENGINE=InnoDB;
1017
1018CREATE TABLE mtb_mail_template (
1019    id smallint,
1020    name text,
1021    rank smallint NOT NULL DEFAULT 0,
1022    PRIMARY KEY (id)
1023) ENGINE=InnoDB;
1024
1025CREATE TABLE mtb_mail_tpl_path (
1026    id smallint,
1027    name text,
1028    rank smallint NOT NULL DEFAULT 0,
1029    PRIMARY KEY (id)
1030) ENGINE=InnoDB;
1031
1032CREATE TABLE mtb_job (
1033    id smallint,
1034    name text,
1035    rank smallint NOT NULL DEFAULT 0,
1036    PRIMARY KEY (id)
1037) ENGINE=InnoDB;
1038
1039CREATE TABLE mtb_reminder (
1040    id smallint,
1041    name text,
1042    rank smallint NOT NULL DEFAULT 0,
1043    PRIMARY KEY (id)
1044) ENGINE=InnoDB;
1045
1046CREATE TABLE mtb_sex (
1047    id smallint,
1048    name text,
1049    rank smallint NOT NULL DEFAULT 0,
1050    PRIMARY KEY (id)
1051) ENGINE=InnoDB;
1052
1053CREATE TABLE mtb_page_rows (
1054    id smallint,
1055    name text,
1056    rank smallint NOT NULL DEFAULT 0,
1057    PRIMARY KEY (id)
1058) ENGINE=InnoDB;
1059
1060CREATE TABLE mtb_mail_type (
1061    id smallint,
1062    name text,
1063    rank smallint NOT NULL DEFAULT 0,
1064    PRIMARY KEY (id)
1065) ENGINE=InnoDB;
1066
1067CREATE TABLE mtb_order_status (
1068    id smallint,
1069    name text,
1070    rank smallint NOT NULL DEFAULT 0,
1071    PRIMARY KEY (id)
1072) ENGINE=InnoDB;
1073
1074CREATE TABLE mtb_product_status_color (
1075    id smallint,
1076    name text,
1077    rank smallint NOT NULL DEFAULT 0,
1078    PRIMARY KEY (id)
1079) ENGINE=InnoDB;
1080
1081CREATE TABLE mtb_order_status_color (
1082    id smallint,
1083    name text,
1084    rank smallint NOT NULL DEFAULT 0,
1085    PRIMARY KEY (id)
1086) ENGINE=InnoDB;
1087
1088CREATE TABLE mtb_wday (
1089    id smallint,
1090    name text,
1091    rank smallint NOT NULL DEFAULT 0,
1092    PRIMARY KEY (id)
1093) ENGINE=InnoDB;
1094
1095CREATE TABLE mtb_delivery_date (
1096    id smallint,
1097    name text,
1098    rank smallint NOT NULL DEFAULT 0,
1099    PRIMARY KEY (id)
1100) ENGINE=InnoDB;
1101
1102CREATE TABLE mtb_product_list_max (
1103    id smallint,
1104    name text,
1105    rank smallint NOT NULL DEFAULT 0,
1106    PRIMARY KEY (id)
1107) ENGINE=InnoDB;
1108
1109CREATE TABLE mtb_convenience (
1110    id smallint,
1111    name text,
1112    rank smallint NOT NULL DEFAULT 0,
1113    PRIMARY KEY (id)
1114) ENGINE=InnoDB;
1115
1116CREATE TABLE mtb_conveni_message (
1117    id smallint,
1118    name text,
1119    rank smallint NOT NULL DEFAULT 0,
1120    PRIMARY KEY (id)
1121) ENGINE=InnoDB;
1122
1123CREATE TABLE mtb_db (
1124    id smallint,
1125    name text,
1126    rank smallint NOT NULL DEFAULT 0,
1127    PRIMARY KEY (id)
1128) ENGINE=InnoDB;
1129
1130CREATE TABLE mtb_target (
1131    id smallint,
1132    name text,
1133    rank smallint NOT NULL DEFAULT 0,
1134    PRIMARY KEY (id)
1135) ENGINE=InnoDB;
1136
1137CREATE TABLE mtb_review_deny_url (
1138    id smallint,
1139    name text,
1140    rank smallint NOT NULL DEFAULT 0,
1141    PRIMARY KEY (id)
1142) ENGINE=InnoDB;
1143
1144CREATE TABLE mtb_track_back_status (
1145    id smallint,
1146    name text,
1147    rank smallint NOT NULL DEFAULT 0,
1148    PRIMARY KEY (id)
1149) ENGINE=InnoDB;
1150
1151CREATE TABLE mtb_site_control_track_back (
1152    id smallint,
1153    name text,
1154    rank smallint NOT NULL DEFAULT 0,
1155    PRIMARY KEY (id)
1156) ENGINE=InnoDB;
1157
1158CREATE TABLE mtb_site_control_affiliate (
1159    id smallint,
1160    name text,
1161    rank smallint NOT NULL DEFAULT 0,
1162    PRIMARY KEY (id)
1163) ENGINE=InnoDB;
1164
1165CREATE TABLE mtb_mobile_domain (
1166    id smallint,
1167    name text,
1168    rank smallint NOT NULL DEFAULT 0,
1169    PRIMARY KEY (id)
1170) ENGINE=InnoDB;
1171
1172CREATE TABLE mtb_ownersstore_err (
1173    id smallint,
1174    name text,
1175    rank smallint NOT NULL DEFAULT 0,
1176    PRIMARY KEY (id)
1177) ENGINE=InnoDB;
1178
1179CREATE TABLE mtb_ownersstore_ips (
1180    id smallint,
1181    name text,
1182    rank smallint NOT NULL DEFAULT 0,
1183    PRIMARY KEY (id)
1184) ENGINE=InnoDB;
1185
1186CREATE TABLE mtb_constants (
1187    id text,
1188    name text,
1189    rank smallint NOT NULL DEFAULT 0,
1190    remarks text,
1191    PRIMARY KEY (id(64))
1192) ENGINE=InnoDB;
1193
1194CREATE TABLE mtb_product_type (
1195    id smallint,
1196    name text,
1197    rank smallint NOT NULL,
1198    PRIMARY KEY (id)
1199) ENGINE=InnoDB;
1200
1201CREATE TABLE mtb_device_type (
1202    id smallint,
1203    name text,
1204    rank smallint NOT NULL,
1205    PRIMARY KEY (id)
1206) ENGINE=InnoDB;
1207
1208CREATE TABLE dtb_mobile_ext_session_id (
1209    session_id text NOT NULL,
1210    param_key text,
1211    param_value text,
1212    url text,
1213    create_date timestamp NOT NULL DEFAULT now()
1214);
1215
1216CREATE TABLE dtb_mobile_kara_mail (
1217    kara_mail_id serial PRIMARY KEY,
1218    session_id text NOT NULL,
1219    token text NOT NULL,
1220    next_url text NOT NULL,
1221    create_date timestamp NOT NULL DEFAULT now(),
1222    email text,
1223    receive_date timestamp
1224);
1225
1226CREATE TABLE dtb_module (
1227    module_id int NOT NULL UNIQUE,
1228    module_code text NOT NULL,
1229    module_name text NOT NULL,
1230    sub_data text,
1231    auto_update_flg smallint NOT NULL DEFAULT 0,
1232    del_flg smallint NOT NULL DEFAULT 0,
1233    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1234    update_date timestamp NOT NULL
1235) ENGINE=InnoDB;
1236
1237CREATE TABLE dtb_session (
1238    sess_id varchar(50) NOT NULL,
1239    sess_data text,
1240    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1241    update_date timestamp NOT NULL,
1242    PRIMARY KEY (sess_id)
1243) ENGINE=InnoDB;
1244
1245CREATE TABLE dtb_site_control (
1246    control_id int NOT NULL,
1247    control_title varchar(255),
1248    control_text text,
1249    control_flg smallint NOT NULL DEFAULT 2,
1250    del_flg smallint NOT NULL DEFAULT 0,
1251    memo text,
1252    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1253    update_date timestamp NOT NULL,
1254    PRIMARY KEY (control_id)
1255) ENGINE=InnoDB;
1256
1257CREATE TABLE dtb_trackback (
1258    trackback_id int  NOT NULL,
1259    product_id int NOT NULL,
1260    blog_name varchar(255) NOT NULL,
1261    title varchar(255) NOT NULL,
1262    excerpt text NOT NULL,
1263    url text NOT NULL,
1264    status smallint NOT NULL DEFAULT 2,
1265    del_flg smallint NOT NULL DEFAULT 0,
1266    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1267    update_date timestamp NOT NULL,
1268    PRIMARY KEY (trackback_id)
1269) ENGINE=InnoDB;
1270
1271CREATE TABLE dtb_bkup (
1272    bkup_name varchar(50),
1273    bkup_memo text,
1274    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1275    PRIMARY KEY (bkup_name)
1276) ENGINE=InnoDB;
1277
1278CREATE TABLE dtb_plugin (
1279    plugin_id int NOT NULL,
1280    plugin_name varchar(255) NOT NULL,
1281    enable smallint NOT NULL DEFAULT 0,
1282    del_flg smallint NOT NULL DEFAULT 0,
1283    class_name varchar(255) NOT NULL,
1284    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1285    update_date timestamp NOT NULL,
1286    PRIMARY KEY (plugin_id)
1287) ENGINE=InnoDB;
1288
1289CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
1290CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1291CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1292CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1293CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
1294CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
1295CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
1296CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1297CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token(64));
1298CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
1299CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
1300
1301CREATE TABLE dtb_index_list (
1302    table_name varchar(30) NOT NULL DEFAULT '',
1303    column_name varchar(30) NOT NULL DEFAULT '',
1304    recommend_flg smallint NOT NULL DEFAULT 0,
1305    recommend_comment text,
1306    PRIMARY KEY (table_name, column_name)
1307) ENGINE=InnoDB;
Note: See TracBrowser for help on using the repository browser.