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

Revision 19928, 31.6 KB checked in by nanasess, 11 years ago (diff)

#843(複数配送先の指定)

  • 送料計算を修正
  • 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_send_history (
238    send_id int  NOT NULL,
239    mail_method smallint,
240    subject text,
241    body text,
242    send_count int,
243    complete_count int NOT NULL DEFAULT 0,
244    start_date datetime,
245    end_date datetime,
246    search_data text,
247    del_flg smallint NOT NULL DEFAULT 0,
248    creator_id int NOT NULL,
249    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
250    update_date timestamp NOT NULL,
251    PRIMARY KEY (send_id)
252) ENGINE=InnoDB;
253
254CREATE TABLE dtb_send_customer (
255    customer_id int,
256    send_id int NOT NULL,
257    email text,
258    name text,
259    send_flag smallint,
260    PRIMARY KEY (send_id, customer_id)
261) ENGINE=InnoDB;
262
263CREATE TABLE dtb_products (
264    product_id int  NOT NULL,
265    name text NOT NULL,
266    maker_id int,
267    status smallint NOT NULL DEFAULT 2,
268    comment1 text,
269    comment2 text,
270    comment3 mediumtext,
271    comment4 text,
272    comment5 text,
273    comment6 text,
274    note text,
275    main_list_comment text,
276    main_list_image text,
277    main_comment mediumtext,
278    main_image text,
279    main_large_image text,
280    sub_title1 text,
281    sub_comment1 mediumtext,
282    sub_image1 text,
283    sub_large_image1 text,
284    sub_title2 text,
285    sub_comment2 mediumtext,
286    sub_image2 text,
287    sub_large_image2 text,
288    sub_title3 text,
289    sub_comment3 mediumtext,
290    sub_image3 text,
291    sub_large_image3 text,
292    sub_title4 text,
293    sub_comment4 mediumtext,
294    sub_image4 text,
295    sub_large_image4 text,
296    sub_title5 text,
297    sub_comment5 mediumtext,
298    sub_image5 text,
299    sub_large_image5 text,
300    sub_title6 text,
301    sub_comment6 mediumtext,
302    sub_image6 text,
303    sub_large_image6 text,
304    del_flg smallint NOT NULL DEFAULT 0,
305    creator_id int NOT NULL,
306    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
307    update_date timestamp NOT NULL,
308    deliv_date_id int,
309    PRIMARY KEY (product_id)
310) ENGINE=InnoDB;
311
312CREATE TABLE dtb_products_class (
313    product_class_id int  NOT NULL,
314    product_id int NOT NULL,
315    class_combination_id int,
316    product_type_id int NOT NULL DEFAULT 0,
317    product_code text,
318    stock numeric,
319    stock_unlimited smallint NOT NULL DEFAULT 0,
320    sale_limit numeric,
321    price01 numeric,
322    price02 numeric NOT NULL,
323    deliv_fee numeric,
324    point_rate numeric,
325    creator_id int NOT NULL,
326    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
327    update_date timestamp NOT NULL,
328    down_filename text,
329    down_realfilename text,
330    del_flg smallint NOT NULL DEFAULT 0,
331    PRIMARY KEY (product_class_id)
332) ENGINE=InnoDB;
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) ENGINE=InnoDB;
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) ENGINE=InnoDB;
356
357CREATE TABLE dtb_class_combination (
358    class_combination_id int NOT NULL,
359    parent_class_combination_id int,
360    classcategory_id int NOT NULL,
361    level int,
362    PRIMARY KEY(class_combination_id)
363) ENGINE=InnoDB;
364
365CREATE TABLE dtb_category (
366    category_id int  NOT NULL,
367    category_name text,
368    parent_category_id int NOT NULL DEFAULT 0,
369    level int NOT NULL,
370    rank int,
371    creator_id int NOT NULL,
372    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
373    update_date timestamp NOT NULL,
374    del_flg smallint NOT NULL DEFAULT 0,
375    PRIMARY KEY (category_id)
376) ENGINE=InnoDB;
377
378CREATE TABLE dtb_product_categories (
379    product_id int NOT NULL,
380    category_id int NOT NULL,
381    rank int NOT NULL,
382    PRIMARY KEY(product_id, category_id)
383) ENGINE=InnoDB;
384
385CREATE TABLE dtb_product_status (
386    product_status_id smallint NOT NULL,
387    product_id int NOT NULL,
388    creator_id int NOT NULL,
389    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
390    update_date timestamp NOT NULL,
391    del_flg smallint NOT NULL DEFAULT 0,
392    PRIMARY KEY(product_status_id, product_id)
393) ENGINE=InnoDB;
394
395CREATE TABLE dtb_bat_order_daily (
396    total_order numeric NOT NULL DEFAULT 0,
397    member numeric NOT NULL DEFAULT 0,
398    nonmember numeric NOT NULL DEFAULT 0,
399    men numeric NOT NULL DEFAULT 0,
400    women numeric NOT NULL DEFAULT 0,
401    men_member numeric NOT NULL DEFAULT 0,
402    men_nonmember numeric NOT NULL DEFAULT 0,
403    women_member numeric NOT NULL DEFAULT 0,
404    women_nonmember numeric NOT NULL DEFAULT 0,
405    total numeric NOT NULL DEFAULT 0,
406    total_average numeric NOT NULL DEFAULT 0,
407    order_date datetime NOT NULL,
408    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
409    year smallint NOT NULL,
410    month smallint NOT NULL,
411    day smallint NOT NULL,
412    wday smallint NOT NULL,
413    key_day text NOT NULL,
414    key_month text NOT NULL,
415    key_year text NOT NULL,
416    key_wday text NOT NULL
417) ENGINE=InnoDB;
418
419CREATE TABLE dtb_bat_order_daily_hour (
420    total_order numeric NOT NULL DEFAULT 0,
421    member numeric NOT NULL DEFAULT 0,
422    nonmember numeric NOT NULL DEFAULT 0,
423    men numeric NOT NULL DEFAULT 0,
424    women numeric NOT NULL DEFAULT 0,
425    men_member numeric NOT NULL DEFAULT 0,
426    men_nonmember numeric NOT NULL DEFAULT 0,
427    women_member numeric NOT NULL DEFAULT 0,
428    women_nonmember numeric NOT NULL DEFAULT 0,
429    total numeric NOT NULL DEFAULT 0,
430    total_average numeric NOT NULL DEFAULT 0,
431    hour smallint NOT NULL DEFAULT 0,
432    order_date datetime,
433    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
434) ENGINE=InnoDB;
435
436CREATE TABLE dtb_recommend_products (
437    product_id int NOT NULL,
438    recommend_product_id int NOT NULL,
439    rank int NOT NULL,
440    comment text,
441    status smallint NOT NULL DEFAULT 0,
442    creator_id int NOT NULL,
443    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
444    update_date timestamp NOT NULL
445) ENGINE=InnoDB;
446
447CREATE TABLE dtb_review (
448    review_id int  NOT NULL,
449    product_id int NOT NULL,
450    reviewer_name text NOT NULL,
451    reviewer_url text,
452    sex smallint,
453    customer_id int,
454    recommend_level smallint NOT NULL,
455    title text NOT NULL,
456    comment text NOT NULL,
457    status smallint DEFAULT 2,
458    creator_id int NOT NULL,
459    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
460    update_date timestamp NOT NULL,
461    del_flg smallint NOT NULL DEFAULT 0,
462    PRIMARY KEY (review_id)
463) ENGINE=InnoDB;
464
465CREATE TABLE dtb_customer_favorite_products (
466    customer_id int NOT NULL,
467    product_id int NOT NULL,
468    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
469    update_date timestamp NOT NULL
470) ENGINE=InnoDB;
471
472CREATE TABLE dtb_category_count (
473    category_id int NOT NULL,
474    product_count int NOT NULL,
475    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
476) ENGINE=InnoDB;
477
478CREATE TABLE dtb_category_total_count (
479    category_id int NOT NULL,
480    product_count int,
481    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
482) ENGINE=InnoDB;
483
484CREATE TABLE dtb_news (
485    news_id int  NOT NULL,
486    news_date datetime,
487    rank int,
488    news_title text NOT NULL,
489    news_comment text,
490    news_url text,
491    news_select smallint NOT NULL DEFAULT 0,
492    link_method text,
493    creator_id int NOT NULL,
494    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
495    update_date timestamp NOT NULL,
496    del_flg smallint NOT NULL DEFAULT 0,
497    PRIMARY KEY (news_id)
498) ENGINE=InnoDB;
499
500CREATE TABLE dtb_best_products (
501    best_id int  NOT NULL,
502    category_id int NOT NULL,
503    rank int NOT NULL DEFAULT 0,
504    product_id int NOT NULL,
505    title text,
506    comment text,
507    creator_id int NOT NULL,
508    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
509    update_date timestamp NOT NULL,
510    del_flg smallint NOT NULL DEFAULT 0,
511    PRIMARY KEY (best_id)
512) ENGINE=InnoDB;
513
514CREATE TABLE dtb_mail_history (
515    send_id int  NOT NULL,
516    order_id int NOT NULL,
517    send_date datetime,
518    template_id int,
519    creator_id int NOT NULL,
520    subject text,
521    mail_body text,
522    PRIMARY KEY (send_id)
523) ENGINE=InnoDB;
524
525CREATE TABLE dtb_customer (
526    customer_id int  NOT NULL,
527    name01 text NOT NULL,
528    name02 text NOT NULL,
529    kana01 text NOT NULL,
530    kana02 text NOT NULL,
531    zip01 text,
532    zip02 text,
533    pref smallint,
534    addr01 text,
535    addr02 text,
536    email text NOT NULL,
537    email_mobile text,
538    tel01 text,
539    tel02 text,
540    tel03 text,
541    fax01 text,
542    fax02 text,
543    fax03 text,
544    sex smallint,
545    job smallint,
546    birth datetime,
547    password text,
548    reminder smallint,
549    reminder_answer text,
550    secret_key varchar(50) NOT NULL UNIQUE,
551    first_buy_date datetime,
552    last_buy_date datetime,
553    buy_times numeric DEFAULT 0,
554    buy_total numeric DEFAULT 0,
555    point numeric DEFAULT 0,
556    note text,
557    status smallint NOT NULL DEFAULT 1,
558    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
559    update_date timestamp NOT NULL,
560    del_flg smallint NOT NULL DEFAULT 0,
561    mobile_phone_id text,
562    mailmaga_flg smallint,
563    PRIMARY KEY (customer_id)
564) ENGINE=InnoDB;
565
566CREATE TABLE dtb_order (
567    order_id int  NOT NULL,
568    order_temp_id text,
569    customer_id int NOT NULL,
570    message text,
571    order_name01 text,
572    order_name02 text,
573    order_kana01 text,
574    order_kana02 text,
575    order_email text,
576    order_tel01 text,
577    order_tel02 text,
578    order_tel03 text,
579    order_fax01 text,
580    order_fax02 text,
581    order_fax03 text,
582    order_zip01 text,
583    order_zip02 text,
584    order_pref smallint,
585    order_addr01 text,
586    order_addr02 text,
587    order_sex smallint,
588    order_birth datetime,
589    order_job int,
590    subtotal numeric,
591    discount numeric,
592    deliv_fee numeric, 
593    charge numeric,
594    use_point numeric,
595    add_point numeric,
596    birth_point numeric DEFAULT 0,
597    tax numeric,
598    total numeric,
599    payment_total numeric,
600    payment_id int,
601    payment_method text,
602    note text,
603    status smallint,
604    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
605    update_date timestamp NOT NULL,
606    commit_date datetime,
607    payment_date datetime,
608    device_type_id int,
609    del_flg smallint NOT NULL DEFAULT 0,
610    memo01 text,
611    memo02 text,
612    memo03 text,
613    memo04 text,
614    memo05 text,
615    memo06 text,
616    memo07 text,
617    memo08 text,
618    memo09 text,
619    memo10 text,
620    PRIMARY KEY (order_id)
621) ENGINE=InnoDB;
622
623CREATE TABLE dtb_order_temp (
624    order_temp_id text NOT NULL,
625    customer_id int NOT NULL,
626    message text,
627    order_name01 text,
628    order_name02 text,
629    order_kana01 text,
630    order_kana02 text,
631    order_email text,
632    order_tel01 text,
633    order_tel02 text,
634    order_tel03 text,
635    order_fax01 text,
636    order_fax02 text,
637    order_fax03 text,
638    order_zip01 text,
639    order_zip02 text,
640    order_pref smallint,
641    order_addr01 text,
642    order_addr02 text,
643    order_sex smallint,
644    order_birth datetime,
645    order_job int,
646    subtotal numeric,
647    discount numeric,
648    deliv_fee numeric,
649    charge numeric,
650    use_point numeric,
651    add_point numeric,
652    birth_point numeric DEFAULT 0,
653    tax numeric,
654    total numeric,
655    payment_total numeric,
656    payment_id int,
657    payment_method text,
658    note text,
659    mail_flag smallint,
660    status smallint,
661    deliv_check smallint,
662    point_check smallint,
663    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
664    update_date timestamp NOT NULL,
665    device_type_id int,
666    del_flg smallint NOT NULL DEFAULT 0,
667    order_id int,
668    memo01 text,
669    memo02 text,
670    memo03 text,
671    memo04 text,
672    memo05 text,
673    memo06 text,
674    memo07 text,
675    memo08 text,
676    memo09 text,
677    memo10 text,
678    session text
679) ENGINE=InnoDB;
680
681CREATE TABLE dtb_shipping (
682    shipping_id int NOT NULL,
683    order_id int NOT NULL,
684    shipping_name01 text,
685    shipping_name02 text,
686    shipping_kana01 text,
687    shipping_kana02 text,
688    shipping_tel01 text,
689    shipping_tel02 text,
690    shipping_tel03 text,
691    shipping_fax01 text,
692    shipping_fax02 text,
693    shipping_fax03 text,
694    shipping_pref smallint,
695    shipping_zip01 text,
696    shipping_zip02 text,
697    shipping_addr01 text,
698    shipping_addr02 text,
699    deliv_id int NOT NULL,
700    time_id int,
701    shipping_time text,
702    shipping_num text,
703    shipping_date datetime,
704    shipping_commit_date datetime,
705    rank int,
706    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
707    update_date timestamp NOT NULL,
708    del_flg smallint NOT NULL DEFAULT 0,
709    PRIMARY KEY (shipping_id, order_id)
710) ENGINE=InnoDB;
711
712CREATE TABLE dtb_shipment_item (
713    shipping_id int NOT NULL,
714    product_class_id int NOT NULL,
715    order_id int NOT NULL,
716    product_name text NOT NULL,
717    product_code text,
718    classcategory_name1 text,
719    classcategory_name2 text,
720    price numeric,
721    quantity numeric,
722    PRIMARY KEY (shipping_id, product_class_id, order_id)
723) ENGINE=InnoDB;
724
725CREATE TABLE dtb_other_deliv (
726    other_deliv_id int  NOT NULL,
727    customer_id int NOT NULL,
728    name01 text,
729    name02 text,
730    kana01 text,
731    kana02 text,
732    zip01 text,
733    zip02 text,
734    pref smallint,
735    addr01 text,
736    addr02 text,
737    tel01 text,
738    tel02 text,
739    tel03 text,
740    PRIMARY KEY (other_deliv_id)
741) ENGINE=InnoDB;
742
743CREATE TABLE dtb_order_detail (
744    order_id int NOT NULL,
745    product_id int NOT NULL,
746    product_class_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    point_rate numeric
754) ENGINE=InnoDB;
755
756CREATE TABLE dtb_member (
757    member_id int  NOT NULL,
758    name text,
759    department text,
760    login_id text NOT NULL,
761    password text NOT NULL,
762    authority smallint NOT NULL,
763    rank int NOT NULL DEFAULT 0,
764    work smallint NOT NULL DEFAULT 1,
765    del_flg smallint NOT NULL DEFAULT 0,
766    creator_id int NOT NULL,
767    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
768    update_date timestamp NOT NULL,
769    login_date datetime,
770    PRIMARY KEY (member_id)
771) ENGINE=InnoDB;
772
773CREATE TABLE dtb_bat_relate_products (
774    product_id int,
775    relate_product_id int,
776    customer_id int,
777    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
778) ENGINE=InnoDB;
779
780CREATE TABLE dtb_pagelayout (
781    device_type_id int NOT NULL,
782    page_id int  NOT NULL,
783    page_name text,
784    url text NOT NULL,
785    php_dir text,
786    tpl_dir text,
787    filename text,
788    header_chk smallint DEFAULT 1,
789    footer_chk smallint DEFAULT 1,
790    edit_flg smallint DEFAULT 1,
791    author text,
792    description text,
793    keyword text,
794    update_url text,
795    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
796    update_date timestamp NOT NULL,
797    PRIMARY KEY (device_type_id, page_id)
798) ENGINE=InnoDB;
799
800CREATE TABLE dtb_bloc (
801    device_type_id int NOT NULL,
802    bloc_id int  NOT NULL,
803    bloc_name text,
804    tpl_path text,
805    filename varchar(50) NOT NULL,
806    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
807    update_date timestamp NOT NULL,
808    php_path text,
809    deletable_flg smallint NOT NULL DEFAULT 1,
810    PRIMARY KEY (device_type_id, bloc_id),
811    UNIQUE (device_type_id, filename)
812) ENGINE=InnoDB;
813
814CREATE TABLE dtb_blocposition (
815    device_type_id int NOT NULL,
816    page_id int NOT NULL,
817    target_id int NOT NULL,
818    bloc_id int NOT NULL,
819    bloc_row int,
820    anywhere smallint DEFAULT 0 NOT NULL,
821    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
822) ENGINE=InnoDB;
823
824CREATE TABLE dtb_csv (
825    no int,
826    csv_id int NOT NULL,
827    col text,
828    disp_name text,
829    rank int,
830    rw_flg smallint DEFAULT 1,
831    status smallint NOT NULL DEFAULT 1,
832    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
833    update_date timestamp NOT NULL,
834    mb_convert_kana_option text,
835    size_const_type text,
836    error_check_types text,
837    PRIMARY KEY (no)
838) ENGINE=InnoDB;
839
840CREATE TABLE dtb_csv_sql (
841    sql_id int,
842    sql_name text NOT NULL,
843    csv_sql text,
844    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
845    update_date timestamp NOT NULL,
846    PRIMARY KEY (sql_id)
847) ENGINE=InnoDB;
848
849CREATE TABLE dtb_templates (
850    template_code varchar(50) NOT NULL,
851    template_name text,
852    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
853    update_date timestamp NOT NULL,
854    PRIMARY KEY (template_code)
855) ENGINE=InnoDB;
856
857CREATE TABLE dtb_table_comment (
858    id int,
859    table_name text,
860    column_name text,
861    description text,
862    PRIMARY KEY (id)
863) ENGINE=InnoDB;
864
865CREATE TABLE dtb_maker (
866    maker_id int NOT NULL,
867    name text NOT NULL,
868    rank int NOT NULL DEFAULT 0,
869    creator_id int NOT NULL,
870    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
871    update_date timestamp NOT NULL,
872    del_flg smallint NOT NULL DEFAULT 0,
873    PRIMARY KEY (maker_id)
874) ENGINE=InnoDB;
875
876CREATE TABLE dtb_maker_count (
877    maker_id int NOT NULL,
878    product_count int NOT NULL,
879    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
880) ENGINE=InnoDB;
881
882CREATE TABLE mtb_pref (
883    id smallint NOT NULL,
884    name text,
885    rank smallint NOT NULL DEFAULT 0,
886    PRIMARY KEY (id)
887) ENGINE=InnoDB;
888
889CREATE TABLE mtb_permission (
890    id text,
891    name text,
892    rank smallint NOT NULL DEFAULT 0,
893    PRIMARY KEY (id(32))
894) ENGINE=InnoDB;
895
896CREATE TABLE mtb_disable_logout (
897    id smallint,
898    name text,
899    rank smallint NOT NULL DEFAULT 0,
900    PRIMARY KEY (id)
901) ENGINE=InnoDB;
902
903CREATE TABLE mtb_authority (
904    id smallint,
905    name text,
906    rank smallint NOT NULL DEFAULT 0,
907    PRIMARY KEY (id)
908) ENGINE=InnoDB;
909
910CREATE TABLE mtb_work (
911    id smallint,
912    name text,
913    rank smallint NOT NULL DEFAULT 0,
914    PRIMARY KEY (id)
915) ENGINE=InnoDB;
916
917CREATE TABLE mtb_disp (
918    id smallint,
919    name text,
920    rank smallint NOT NULL DEFAULT 0,
921    PRIMARY KEY (id)
922) ENGINE=InnoDB;
923
924CREATE TABLE mtb_class (
925    id smallint,
926    name text,
927    rank smallint NOT NULL DEFAULT 0,
928    PRIMARY KEY (id)
929) ENGINE=InnoDB;
930
931CREATE TABLE mtb_status (
932    id smallint,
933    name text,
934    rank smallint NOT NULL DEFAULT 0,
935    PRIMARY KEY (id)
936) ENGINE=InnoDB;
937
938CREATE TABLE mtb_status_image (
939    id smallint,
940    name text,
941    rank smallint NOT NULL DEFAULT 0,
942    PRIMARY KEY (id)
943) ENGINE=InnoDB;
944
945CREATE TABLE mtb_allowed_tag (
946    id smallint,
947    name text,
948    rank smallint NOT NULL DEFAULT 0,
949    PRIMARY KEY (id)
950) ENGINE=InnoDB;
951
952CREATE TABLE mtb_page_max (
953    id smallint,
954    name text,
955    rank smallint NOT NULL DEFAULT 0,
956    PRIMARY KEY (id)
957) ENGINE=InnoDB;
958
959CREATE TABLE mtb_magazine_type (
960    id smallint,
961    name text,
962    rank smallint NOT NULL DEFAULT 0,
963    PRIMARY KEY (id)
964) ENGINE=InnoDB;
965
966CREATE TABLE mtb_mail_magazine_type (
967    id smallint,
968    name text,
969    rank smallint NOT NULL DEFAULT 0,
970    PRIMARY KEY (id)
971) ENGINE=InnoDB;
972
973CREATE TABLE mtb_recommend (
974    id smallint,
975    name text,
976    rank smallint NOT NULL DEFAULT 0,
977    PRIMARY KEY (id)
978) ENGINE=InnoDB;
979
980CREATE TABLE mtb_taxrule (
981    id smallint,
982    name text,
983    rank smallint NOT NULL DEFAULT 0,
984    PRIMARY KEY (id)
985) ENGINE=InnoDB;
986
987CREATE TABLE mtb_mail_template (
988    id smallint,
989    name text,
990    rank smallint NOT NULL DEFAULT 0,
991    PRIMARY KEY (id)
992) ENGINE=InnoDB;
993
994CREATE TABLE mtb_mail_tpl_path (
995    id smallint,
996    name text,
997    rank smallint NOT NULL DEFAULT 0,
998    PRIMARY KEY (id)
999) ENGINE=InnoDB;
1000
1001CREATE TABLE mtb_job (
1002    id smallint,
1003    name text,
1004    rank smallint NOT NULL DEFAULT 0,
1005    PRIMARY KEY (id)
1006) ENGINE=InnoDB;
1007
1008CREATE TABLE mtb_reminder (
1009    id smallint,
1010    name text,
1011    rank smallint NOT NULL DEFAULT 0,
1012    PRIMARY KEY (id)
1013) ENGINE=InnoDB;
1014
1015CREATE TABLE mtb_sex (
1016    id smallint,
1017    name text,
1018    rank smallint NOT NULL DEFAULT 0,
1019    PRIMARY KEY (id)
1020) ENGINE=InnoDB;
1021
1022CREATE TABLE mtb_page_rows (
1023    id smallint,
1024    name text,
1025    rank smallint NOT NULL DEFAULT 0,
1026    PRIMARY KEY (id)
1027) ENGINE=InnoDB;
1028
1029CREATE TABLE mtb_mail_type (
1030    id smallint,
1031    name text,
1032    rank smallint NOT NULL DEFAULT 0,
1033    PRIMARY KEY (id)
1034) ENGINE=InnoDB;
1035
1036CREATE TABLE mtb_order_status (
1037    id smallint,
1038    name text,
1039    rank smallint NOT NULL DEFAULT 0,
1040    PRIMARY KEY (id)
1041) ENGINE=InnoDB;
1042
1043CREATE TABLE mtb_product_status_color (
1044    id smallint,
1045    name text,
1046    rank smallint NOT NULL DEFAULT 0,
1047    PRIMARY KEY (id)
1048) ENGINE=InnoDB;
1049
1050CREATE TABLE mtb_order_status_color (
1051    id smallint,
1052    name text,
1053    rank smallint NOT NULL DEFAULT 0,
1054    PRIMARY KEY (id)
1055) ENGINE=InnoDB;
1056
1057CREATE TABLE mtb_wday (
1058    id smallint,
1059    name text,
1060    rank smallint NOT NULL DEFAULT 0,
1061    PRIMARY KEY (id)
1062) ENGINE=InnoDB;
1063
1064CREATE TABLE mtb_delivery_date (
1065    id smallint,
1066    name text,
1067    rank smallint NOT NULL DEFAULT 0,
1068    PRIMARY KEY (id)
1069) ENGINE=InnoDB;
1070
1071CREATE TABLE mtb_product_list_max (
1072    id smallint,
1073    name text,
1074    rank smallint NOT NULL DEFAULT 0,
1075    PRIMARY KEY (id)
1076) ENGINE=InnoDB;
1077
1078CREATE TABLE mtb_convenience (
1079    id smallint,
1080    name text,
1081    rank smallint NOT NULL DEFAULT 0,
1082    PRIMARY KEY (id)
1083) ENGINE=InnoDB;
1084
1085CREATE TABLE mtb_conveni_message (
1086    id smallint,
1087    name text,
1088    rank smallint NOT NULL DEFAULT 0,
1089    PRIMARY KEY (id)
1090) ENGINE=InnoDB;
1091
1092CREATE TABLE mtb_db (
1093    id smallint,
1094    name text,
1095    rank smallint NOT NULL DEFAULT 0,
1096    PRIMARY KEY (id)
1097) ENGINE=InnoDB;
1098
1099CREATE TABLE mtb_target (
1100    id smallint,
1101    name text,
1102    rank smallint NOT NULL DEFAULT 0,
1103    PRIMARY KEY (id)
1104) ENGINE=InnoDB;
1105
1106CREATE TABLE mtb_review_deny_url (
1107    id smallint,
1108    name text,
1109    rank smallint NOT NULL DEFAULT 0,
1110    PRIMARY KEY (id)
1111) ENGINE=InnoDB;
1112
1113CREATE TABLE mtb_track_back_status (
1114    id smallint,
1115    name text,
1116    rank smallint NOT NULL DEFAULT 0,
1117    PRIMARY KEY (id)
1118) ENGINE=InnoDB;
1119
1120CREATE TABLE mtb_site_control_track_back (
1121    id smallint,
1122    name text,
1123    rank smallint NOT NULL DEFAULT 0,
1124    PRIMARY KEY (id)
1125) ENGINE=InnoDB;
1126
1127CREATE TABLE mtb_site_control_affiliate (
1128    id smallint,
1129    name text,
1130    rank smallint NOT NULL DEFAULT 0,
1131    PRIMARY KEY (id)
1132) ENGINE=InnoDB;
1133
1134CREATE TABLE mtb_mobile_domain (
1135    id smallint,
1136    name text,
1137    rank smallint NOT NULL DEFAULT 0,
1138    PRIMARY KEY (id)
1139) ENGINE=InnoDB;
1140
1141CREATE TABLE mtb_ownersstore_err (
1142    id smallint,
1143    name text,
1144    rank smallint NOT NULL DEFAULT 0,
1145    PRIMARY KEY (id)
1146) ENGINE=InnoDB;
1147
1148CREATE TABLE mtb_ownersstore_ips (
1149    id smallint,
1150    name text,
1151    rank smallint NOT NULL DEFAULT 0,
1152    PRIMARY KEY (id)
1153) ENGINE=InnoDB;
1154
1155CREATE TABLE mtb_constants (
1156    id text,
1157    name text,
1158    rank smallint NOT NULL DEFAULT 0,
1159    remarks text,
1160    PRIMARY KEY (id(64))
1161) ENGINE=InnoDB;
1162
1163CREATE TABLE mtb_product_type (
1164    id smallint,
1165    name text,
1166    rank smallint NOT NULL,
1167    PRIMARY KEY (id)
1168) ENGINE=InnoDB;
1169
1170CREATE TABLE mtb_device_type (
1171    id smallint,
1172    name text,
1173    rank smallint NOT NULL,
1174    PRIMARY KEY (id)
1175) ENGINE=InnoDB;
1176
1177CREATE TABLE dtb_mobile_ext_session_id (
1178    session_id text NOT NULL,
1179    param_key text,
1180    param_value text,
1181    url text,
1182    create_date timestamp NOT NULL DEFAULT now()
1183);
1184
1185CREATE TABLE dtb_mobile_kara_mail (
1186    kara_mail_id serial PRIMARY KEY,
1187    session_id text NOT NULL,
1188    token text NOT NULL,
1189    next_url text NOT NULL,
1190    create_date timestamp NOT NULL DEFAULT now(),
1191    email text,
1192    receive_date timestamp
1193);
1194
1195CREATE TABLE dtb_module (
1196    module_id int NOT NULL UNIQUE,
1197    module_code text NOT NULL,
1198    module_name text NOT NULL,
1199    sub_data text,
1200    auto_update_flg smallint NOT NULL DEFAULT 0,
1201    del_flg smallint NOT NULL DEFAULT 0,
1202    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1203    update_date timestamp NOT NULL
1204) ENGINE=InnoDB;
1205
1206CREATE TABLE dtb_session (
1207    sess_id varchar(50) NOT NULL,
1208    sess_data text,
1209    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1210    update_date timestamp NOT NULL,
1211    PRIMARY KEY (sess_id)
1212) ENGINE=InnoDB;
1213
1214CREATE TABLE dtb_site_control (
1215    control_id int NOT NULL,
1216    control_title varchar(255),
1217    control_text text,
1218    control_flg smallint NOT NULL DEFAULT 2,
1219    del_flg smallint NOT NULL DEFAULT 0,
1220    memo text,
1221    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1222    update_date timestamp NOT NULL,
1223    PRIMARY KEY (control_id)
1224) ENGINE=InnoDB;
1225
1226CREATE TABLE dtb_trackback (
1227    trackback_id int  NOT NULL,
1228    product_id int NOT NULL,
1229    blog_name varchar(255) NOT NULL,
1230    title varchar(255) NOT NULL,
1231    excerpt text NOT NULL,
1232    url text NOT NULL,
1233    status smallint NOT NULL DEFAULT 2,
1234    del_flg smallint NOT NULL DEFAULT 0,
1235    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1236    update_date timestamp NOT NULL,
1237    PRIMARY KEY (trackback_id)
1238) ENGINE=InnoDB;
1239
1240CREATE TABLE dtb_bkup (
1241    bkup_name varchar(50),
1242    bkup_memo text,
1243    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1244    PRIMARY KEY (bkup_name)
1245) ENGINE=InnoDB;
1246
1247CREATE TABLE dtb_plugin (
1248    plugin_id int NOT NULL,
1249    plugin_name varchar(255) NOT NULL,
1250    enable smallint NOT NULL DEFAULT 0,
1251    del_flg smallint NOT NULL DEFAULT 0,
1252    class_name varchar(255) NOT NULL,
1253    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1254    update_date timestamp NOT NULL,
1255    PRIMARY KEY (plugin_id)
1256) ENGINE=InnoDB;
1257
1258CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
1259CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1260CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1261CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1262CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
1263CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
1264CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
1265CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1266CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token(64));
1267CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
1268CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
1269
1270CREATE TABLE dtb_index_list (
1271    table_name varchar(30) NOT NULL DEFAULT '',
1272    column_name varchar(30) NOT NULL DEFAULT '',
1273    recommend_flg smallint NOT NULL DEFAULT 0,
1274    recommend_comment text,
1275    PRIMARY KEY (table_name, column_name)
1276) ENGINE=InnoDB;
Note: See TracBrowser for help on using the repository browser.