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

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