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

Revision 19780, 29.8 KB checked in by nanasess, 13 years ago (diff)

r19773 の修正漏れ

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