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

Revision 18764, 29.5 KB checked in by tao, 14 years ago (diff)

フッターのコピーライト表記の年自動更新 (#788)

  • 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 auto_increment 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 auto_increment 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 auto_increment 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) TYPE=InnoDB;
151
152CREATE TABLE dtb_deliv (
153    deliv_id int auto_increment NOT NULL,
154    name text,
155    service_name text,
156    confirm_url text,
157    rank int,
158    status smallint NOT NULL DEFAULT 1,
159    del_flg smallint NOT NULL DEFAULT 0,
160    creator_id int NOT NULL,
161    create_date datetime NOT NULL,
162    update_date datetime,
163    PRIMARY KEY (deliv_id)
164) TYPE=InnoDB;
165
166CREATE TABLE dtb_delivtime (
167    deliv_id int NOT NULL,
168    time_id int NOT NULL,
169    deliv_time text NOT NULL,
170    PRIMARY KEY (deliv_id, time_id)
171) TYPE=InnoDB;
172
173CREATE TABLE dtb_delivfee (
174    deliv_id int NOT NULL,
175    fee_id int auto_increment NOT NULL,
176    fee text NOT NULL,
177    pref smallint,
178    PRIMARY KEY (fee_id)
179) TYPE=InnoDB;
180
181CREATE TABLE dtb_payment (
182    payment_id int auto_increment NOT NULL,
183    payment_method text,
184    charge numeric,
185    rule numeric,
186    deliv_id int DEFAULT 0,
187    rank int,
188    note text,
189    fix smallint,
190    status smallint NOT NULL DEFAULT 1,
191    del_flg smallint NOT NULL DEFAULT 0,
192    creator_id int NOT NULL,
193    create_date datetime NOT NULL,
194    update_date datetime,
195    payment_image text,
196    upper_rule numeric,
197    charge_flg smallint DEFAULT 1,
198    rule_min numeric,
199    upper_rule_max numeric,
200    module_id int,
201    module_path text,
202    memo01 text,
203    memo02 text,
204    memo03 text,
205    memo04 text,
206    memo05 text,
207    memo06 text,
208    memo07 text,
209    memo08 text,
210    memo09 text,
211    memo10 text,
212    PRIMARY KEY (payment_id)
213) TYPE=InnoDB;
214
215CREATE TABLE dtb_mailtemplate (
216    template_id int NOT NULL,
217    subject text,
218    header text,
219    footer text,
220    creator_id int NOT NULL,
221    del_flg smallint NOT NULL DEFAULT 0,
222    create_date datetime NOT NULL,
223    update_date datetime NOT NULL
224) TYPE=InnoDB;
225
226CREATE TABLE dtb_mailmaga_template (
227    template_id int auto_increment NOT NULL,
228    subject text,
229    charge_image text,
230    mail_method int,
231    header text,
232    body text,
233    main_title text,
234    main_comment text,
235    main_product_id int,
236    sub_title text,
237    sub_comment text,
238    sub_product_id01 int,
239    sub_product_id02 int,
240    sub_product_id03 int,
241    sub_product_id04 int,
242    sub_product_id05 int,
243    sub_product_id06 int,
244    sub_product_id07 int,
245    sub_product_id08 int,
246    sub_product_id09 int,
247    sub_product_id10 int,
248    sub_product_id11 int,
249    sub_product_id12 int,
250    del_flg smallint NOT NULL DEFAULT 0,
251    creator_id int NOT NULL,
252    create_date datetime NOT NULL,
253    update_date datetime,
254    PRIMARY KEY (template_id)
255) TYPE=InnoDB;
256
257CREATE TABLE dtb_send_history (
258    send_id int auto_increment NOT NULL,
259    mail_method smallint,
260    subject text,
261    body text,
262    send_count int,
263    complete_count int NOT NULL DEFAULT 0,
264    start_date datetime,
265    end_date datetime,
266    search_data text,
267    del_flg smallint NOT NULL DEFAULT 0,
268    creator_id int NOT NULL,
269    create_date datetime NOT NULL,
270    update_date datetime NOT NULL,
271    PRIMARY KEY (send_id)
272) TYPE=InnoDB;
273
274CREATE TABLE dtb_send_customer (
275    customer_id int,
276    send_id int NOT NULL,
277    email text,
278    name text,
279    send_flag smallint,
280    PRIMARY KEY (send_id, customer_id)
281) TYPE=InnoDB;
282
283CREATE TABLE dtb_products (
284    product_id int auto_increment NOT NULL,
285    name text,
286    deliv_fee numeric,
287    sale_limit numeric,
288    category_id int,
289    maker_id int,
290    rank int,
291    status smallint NOT NULL DEFAULT 2,
292    product_flag text,
293    point_rate numeric,
294    comment1 text,
295    comment2 text,
296    comment3 mediumtext,
297    comment4 text,
298    comment5 text,
299    comment6 text,
300    note text,
301    file1 text,
302    file2 text,
303    file3 text,
304    file4 text,
305    file5 text,
306    file6 text,
307    main_list_comment text,
308    main_list_image text,
309    main_comment mediumtext,
310    main_image text,
311    main_large_image text,
312    sub_title1 text,
313    sub_comment1 mediumtext,
314    sub_image1 text,
315    sub_large_image1 text,
316    sub_title2 text,
317    sub_comment2 mediumtext,
318    sub_image2 text,
319    sub_large_image2 text,
320    sub_title3 text,
321    sub_comment3 mediumtext,
322    sub_image3 text,
323    sub_large_image3 text,
324    sub_title4 text,
325    sub_comment4 mediumtext,
326    sub_image4 text,
327    sub_large_image4 text,
328    sub_title5 text,
329    sub_comment5 mediumtext,
330    sub_image5 text,
331    sub_large_image5 text,
332    sub_title6 text,
333    sub_comment6 mediumtext,
334    sub_image6 text,
335    sub_large_image6 text,
336    del_flg smallint NOT NULL DEFAULT 0,
337    creator_id int NOT NULL,
338    create_date datetime NOT NULL,
339    update_date datetime,
340    deliv_date_id int,
341    PRIMARY KEY (product_id)
342) TYPE=InnoDB;
343
344CREATE TABLE dtb_products_class (
345    product_class_id int auto_increment NOT NULL,
346    product_id int NOT NULL,
347    classcategory_id1 int NOT NULL DEFAULT 0,
348    classcategory_id2 int NOT NULL DEFAULT 0,
349    product_code text,
350    stock numeric,
351    stock_unlimited smallint NOT NULL DEFAULT 0,
352    sale_limit numeric,
353    price01 numeric,
354    price02 numeric,
355    status smallint,
356    creator_id int NOT NULL,
357    create_date datetime NOT NULL,
358    update_date datetime,
359    PRIMARY KEY (product_class_id)
360) TYPE=InnoDB;
361
362CREATE TABLE dtb_class (
363    class_id int auto_increment NOT NULL,
364    name text,
365    status smallint,
366    rank int,
367    creator_id int NOT NULL,
368    create_date datetime NOT NULL,
369    update_date datetime,
370    del_flg smallint NOT NULL DEFAULT 0,
371    product_id int,
372    PRIMARY KEY (class_id)
373) TYPE=InnoDB;
374
375CREATE TABLE dtb_classcategory (
376    classcategory_id int auto_increment NOT NULL,
377    name text,
378    class_id int NOT NULL,
379    status smallint,
380    rank int,
381    creator_id int NOT NULL,
382    create_date datetime NOT NULL,
383    update_date datetime,
384    del_flg smallint NOT NULL DEFAULT 0,
385    PRIMARY KEY (classcategory_id)
386) TYPE=InnoDB;
387
388CREATE TABLE dtb_category (
389    category_id int auto_increment NOT NULL,
390    category_name text,
391    parent_category_id int NOT NULL DEFAULT 0,
392    level int NOT NULL,
393    rank int,
394    creator_id int NOT NULL,
395    create_date datetime NOT NULL,
396    update_date datetime,
397    del_flg smallint NOT NULL DEFAULT 0,
398    PRIMARY KEY (category_id)
399) TYPE=InnoDB;
400
401CREATE TABLE dtb_product_categories (
402    product_id int NOT NULL,
403    category_id int NOT NULL,
404    rank int NOT NULL,
405    PRIMARY KEY(product_id, category_id)
406) TYPE=InnoDB;
407
408CREATE TABLE dtb_bat_order_daily (
409    total_order numeric NOT NULL DEFAULT 0,
410    member numeric NOT NULL DEFAULT 0,
411    nonmember numeric NOT NULL DEFAULT 0,
412    men numeric NOT NULL DEFAULT 0,
413    women numeric NOT NULL DEFAULT 0,
414    men_member numeric NOT NULL DEFAULT 0,
415    men_nonmember numeric NOT NULL DEFAULT 0,
416    women_member numeric NOT NULL DEFAULT 0,
417    women_nonmember numeric NOT NULL DEFAULT 0,
418    total numeric NOT NULL DEFAULT 0,
419    total_average numeric NOT NULL DEFAULT 0,
420    order_date datetime NOT NULL,
421    create_date datetime NOT NULL,
422    year smallint NOT NULL,
423    month smallint NOT NULL,
424    day smallint NOT NULL,
425    wday smallint NOT NULL,
426    key_day text NOT NULL,
427    key_month text NOT NULL,
428    key_year text NOT NULL,
429    key_wday text NOT NULL
430) TYPE=InnoDB;
431
432CREATE TABLE dtb_bat_order_daily_hour (
433    total_order numeric NOT NULL DEFAULT 0,
434    member numeric NOT NULL DEFAULT 0,
435    nonmember numeric NOT NULL DEFAULT 0,
436    men numeric NOT NULL DEFAULT 0,
437    women numeric NOT NULL DEFAULT 0,
438    men_member numeric NOT NULL DEFAULT 0,
439    men_nonmember numeric NOT NULL DEFAULT 0,
440    women_member numeric NOT NULL DEFAULT 0,
441    women_nonmember numeric NOT NULL DEFAULT 0,
442    total numeric NOT NULL DEFAULT 0,
443    total_average numeric NOT NULL DEFAULT 0,
444    hour smallint NOT NULL DEFAULT 0,
445    order_date datetime,
446    create_date datetime NOT NULL
447) TYPE=InnoDB;
448
449CREATE TABLE dtb_recommend_products (
450    product_id int NOT NULL,
451    recommend_product_id int NOT NULL,
452    rank int NOT NULL,
453    comment text,
454    status smallint NOT NULL DEFAULT 0,
455    creator_id int NOT NULL,
456    create_date datetime NOT NULL,
457    update_date datetime NOT NULL
458) TYPE=InnoDB;
459
460CREATE TABLE dtb_review (
461    review_id int auto_increment NOT NULL,
462    product_id int NOT NULL,
463    reviewer_name text NOT NULL,
464    reviewer_url text,
465    sex smallint,
466    customer_id int,
467    recommend_level smallint NOT NULL,
468    title text NOT NULL,
469    comment text NOT NULL,
470    status smallint DEFAULT 2,
471    creator_id int NOT NULL,
472    create_date datetime,
473    update_date datetime,
474    del_flg smallint NOT NULL DEFAULT 0,
475    PRIMARY KEY (review_id)
476) TYPE=InnoDB;
477
478CREATE TABLE dtb_customer_reading (
479    reading_product_id int NOT NULL,
480    customer_id int NOT NULL,
481    create_date datetime NOT NULL,
482    update_date datetime NOT NULL
483) TYPE=InnoDB;
484
485CREATE TABLE dtb_customer_favorite_products (
486    customer_id int NOT NULL,
487    product_id int NOT NULL,
488    create_date datetime NOT NULL,
489    update_date datetime NOT NULL
490) TYPE=InnoDB;
491
492CREATE TABLE dtb_category_count (
493    category_id int NOT NULL,
494    product_count int NOT NULL,
495    create_date datetime NOT NULL
496) TYPE=InnoDB;
497
498CREATE TABLE dtb_category_total_count (
499    category_id int NOT NULL,
500    product_count int,
501    create_date datetime NOT NULL
502) TYPE=InnoDB;
503
504CREATE TABLE dtb_news (
505    news_id int auto_increment NOT NULL,
506    news_date datetime,
507    rank int,
508    news_title text NOT NULL,
509    news_comment text,
510    news_url text,
511    news_select smallint NOT NULL DEFAULT 0,
512    link_method text,
513    creator_id int NOT NULL,
514    create_date datetime NOT NULL,
515    update_date datetime,
516    del_flg smallint NOT NULL DEFAULT 0,
517    PRIMARY KEY (news_id)
518) TYPE=InnoDB;
519
520CREATE TABLE dtb_best_products (
521    best_id int auto_increment NOT NULL,
522    category_id int NOT NULL,
523    rank int NOT NULL DEFAULT 0,
524    product_id int NOT NULL,
525    title text,
526    comment text,
527    creator_id int NOT NULL,
528    create_date datetime NOT NULL,
529    update_date datetime,
530    del_flg smallint NOT NULL DEFAULT 0,
531    PRIMARY KEY (best_id)
532) TYPE=InnoDB;
533
534CREATE TABLE dtb_mail_history (
535    send_id int auto_increment NOT NULL,
536    order_id int NOT NULL,
537    send_date datetime,
538    template_id int,
539    creator_id int NOT NULL,
540    subject text,
541    mail_body text,
542    PRIMARY KEY (send_id)
543) TYPE=InnoDB;
544
545CREATE TABLE dtb_customer (
546    customer_id int auto_increment NOT NULL,
547    name01 text NOT NULL,
548    name02 text NOT NULL,
549    kana01 text NOT NULL,
550    kana02 text NOT NULL,
551    zip01 text,
552    zip02 text,
553    pref smallint,
554    addr01 text,
555    addr02 text,
556    email text NOT NULL,
557    email_mobile text,
558    tel01 text,
559    tel02 text,
560    tel03 text,
561    fax01 text,
562    fax02 text,
563    fax03 text,
564    sex smallint,
565    job smallint,
566    birth datetime,
567    password text,
568    reminder smallint,
569    reminder_answer text,
570    secret_key varchar(50) NOT NULL UNIQUE,
571    first_buy_date datetime,
572    last_buy_date datetime,
573    buy_times numeric DEFAULT 0,
574    buy_total numeric DEFAULT 0,
575    point numeric DEFAULT 0,
576    note text,
577    status smallint NOT NULL DEFAULT 1,
578    create_date datetime NOT NULL,
579    update_date datetime,
580    del_flg smallint NOT NULL DEFAULT 0,
581    cell01 text,
582    cell02 text,
583    cell03 text,
584    mobile_phone_id text,
585    mailmaga_flg smallint,
586    PRIMARY KEY (customer_id)
587) TYPE=InnoDB;
588
589CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
590
591CREATE TABLE dtb_customer_mail_temp (
592    email varchar(50) NOT NULL UNIQUE,
593    mail_flag smallint,
594    temp_id varchar(50) NOT NULL,
595    end_flag smallint,
596    update_date datetime NOT NULL,
597    create_data datetime NOT NULL,
598    PRIMARY KEY (temp_id)
599) TYPE=InnoDB;
600
601CREATE TABLE dtb_order (
602    order_id int auto_increment NOT NULL,
603    order_temp_id text,
604    customer_id int NOT NULL,
605    message text,
606    order_name01 text,
607    order_name02 text,
608    order_kana01 text,
609    order_kana02 text,
610    order_email text,
611    order_tel01 text,
612    order_tel02 text,
613    order_tel03 text,
614    order_fax01 text,
615    order_fax02 text,
616    order_fax03 text,
617    order_zip01 text,
618    order_zip02 text,
619    order_pref smallint,
620    order_addr01 text,
621    order_addr02 text,
622    order_sex smallint,
623    order_birth datetime,
624    order_job int,
625    deliv_name01 text,
626    deliv_name02 text,
627    deliv_kana01 text,
628    deliv_kana02 text,
629    deliv_tel01 text,
630    deliv_tel02 text,
631    deliv_tel03 text,
632    deliv_fax01 text,
633    deliv_fax02 text,
634    deliv_fax03 text,
635    deliv_zip01 text,
636    deliv_zip02 text,
637    deliv_pref smallint,
638    deliv_addr01 text,
639    deliv_addr02 text,
640    subtotal numeric,
641    discount numeric,
642    deliv_fee numeric,
643    charge numeric,
644    use_point numeric,
645    add_point numeric,
646    birth_point numeric DEFAULT 0,
647    tax numeric,
648    total numeric,
649    payment_total numeric,
650    payment_id int,
651    payment_method text,
652    deliv_id int,
653    deliv_time_id int,
654    deliv_time text,
655    deliv_no text,
656    note text,
657    status smallint,
658    create_date datetime NOT NULL,
659    loan_result text,
660    credit_result text,
661    credit_msg text,
662    update_date datetime,
663    commit_date datetime,
664    del_flg smallint NOT NULL DEFAULT 0,
665    deliv_date text,
666    conveni_data text,
667    cell01 text,
668    cell02 text,
669    cell03 text,
670    memo01 text,
671    memo02 text,
672    memo03 text,
673    memo04 text,
674    memo05 text,
675    memo06 text,
676    memo07 text,
677    memo08 text,
678    memo09 text,
679    memo10 text,
680    campaign_id int,
681    PRIMARY KEY (order_id)
682) TYPE=InnoDB;
683
684CREATE TABLE dtb_order_temp (
685    order_temp_id text NOT NULL,
686    customer_id int NOT NULL,
687    message text,
688    order_name01 text,
689    order_name02 text,
690    order_kana01 text,
691    order_kana02 text,
692    order_email text,
693    order_tel01 text,
694    order_tel02 text,
695    order_tel03 text,
696    order_fax01 text,
697    order_fax02 text,
698    order_fax03 text,
699    order_zip01 text,
700    order_zip02 text,
701    order_pref smallint,
702    order_addr01 text,
703    order_addr02 text,
704    order_sex smallint,
705    order_birth datetime,
706    order_job int,
707    deliv_name01 text,
708    deliv_name02 text,
709    deliv_kana01 text,
710    deliv_kana02 text,
711    deliv_tel01 text,
712    deliv_tel02 text,
713    deliv_tel03 text,
714    deliv_fax01 text,
715    deliv_fax02 text,
716    deliv_fax03 text,
717    deliv_zip01 text,
718    deliv_zip02 text,
719    deliv_pref smallint,
720    deliv_addr01 text,
721    deliv_addr02 text,
722    subtotal numeric,
723    discount numeric,
724    deliv_fee numeric,
725    charge numeric,
726    use_point numeric,
727    add_point numeric,
728    birth_point numeric DEFAULT 0,
729    tax numeric,
730    total numeric,
731    payment_total numeric,
732    payment_id int,
733    payment_method text,
734    deliv_id int,
735    deliv_time_id int,
736    deliv_time text,
737    deliv_no text,
738    note text,
739    mail_flag smallint,
740    status smallint,
741    deliv_check smallint,
742    point_check smallint,
743    loan_result text,
744    credit_result text,
745    credit_msg text,
746    create_date datetime NOT NULL,
747    update_date datetime,
748    del_flg smallint NOT NULL DEFAULT 0,
749    deliv_date text,
750    conveni_data text,
751    cell01 text,
752    cell02 text,
753    cell03 text,
754    order_id int,
755    memo01 text,
756    memo02 text,
757    memo03 text,
758    memo04 text,
759    memo05 text,
760    memo06 text,
761    memo07 text,
762    memo08 text,
763    memo09 text,
764    memo10 text,
765    session text
766) TYPE=InnoDB;
767
768CREATE TABLE dtb_other_deliv (
769    other_deliv_id int auto_increment NOT NULL,
770    customer_id int NOT NULL,
771    name01 text,
772    name02 text,
773    kana01 text,
774    kana02 text,
775    zip01 text,
776    zip02 text,
777    pref smallint,
778    addr01 text,
779    addr02 text,
780    tel01 text,
781    tel02 text,
782    tel03 text,
783    PRIMARY KEY (other_deliv_id)
784) TYPE=InnoDB;
785
786CREATE TABLE dtb_order_detail (
787    order_id int NOT NULL,
788    product_id int NOT NULL,
789    classcategory_id1 int NOT NULL,
790    classcategory_id2 int NOT NULL,
791    product_name text NOT NULL,
792    product_code text,
793    classcategory_name1 text,
794    classcategory_name2 text,
795    price numeric,
796    quantity numeric,
797    point_rate numeric
798) TYPE=InnoDB;
799
800CREATE TABLE mtb_pref (
801    pref_id smallint NOT NULL,
802    pref_name text,
803    rank smallint NOT NULL DEFAULT 0,
804    PRIMARY KEY (pref_id)
805) TYPE=InnoDB;
806
807CREATE TABLE dtb_member (
808    member_id int auto_increment NOT NULL,
809    name text,
810    department text,
811    login_id text NOT NULL,
812    password text NOT NULL,
813    authority smallint NOT NULL,
814    rank int NOT NULL DEFAULT 0,
815    work smallint NOT NULL DEFAULT 1,
816    del_flg smallint NOT NULL DEFAULT 0,
817    creator_id int NOT NULL,
818    update_date datetime,
819    create_date datetime NOT NULL,
820    login_date datetime,
821    PRIMARY KEY (member_id)
822) TYPE=InnoDB;
823
824CREATE TABLE dtb_question (
825    question_id int auto_increment NOT NULL,
826    question_name text,
827    question text,
828    create_date datetime NOT NULL,
829    del_flg smallint NOT NULL DEFAULT 0,
830    PRIMARY KEY (question_id)
831) TYPE=InnoDB;
832
833CREATE TABLE dtb_question_result (
834    result_id int auto_increment NOT NULL,
835    question_id int NOT NULL,
836    question_date datetime,
837    question_name text,
838    name01 text,
839    name02 text,
840    kana01 text,
841    kana02 text,
842    zip01 text,
843    zip02 text,
844    pref smallint,
845    addr01 text,
846    addr02 text,
847    tel01 text,
848    tel02 text,
849    tel03 text,
850    mail01 text,
851    question01 text,
852    question02 text,
853    question03 text,
854    question04 text,
855    question05 text,
856    question06 text,
857    create_date datetime NOT NULL,
858    del_flg smallint NOT NULL DEFAULT 0,
859    PRIMARY KEY (result_id)
860) TYPE=InnoDB;
861
862CREATE TABLE dtb_bat_relate_products (
863    product_id int,
864    relate_product_id int,
865    customer_id int,
866    create_date datetime
867) TYPE=InnoDB;
868
869CREATE TABLE dtb_campaign (
870    campaign_id int auto_increment NOT NULL,
871    campaign_name text,
872    campaign_point_rate numeric NOT NULL,
873    campaign_point_type smallint,
874    start_date datetime NOT NULL,
875    end_date datetime NOT NULL,
876    directory_name text NOT NULL,
877    limit_count int NOT NULL DEFAULT 0,
878    total_count int NOT NULL DEFAULT 0,
879    orverlapping_flg smallint NOT NULL DEFAULT 0,
880    cart_flg smallint NOT NULL DEFAULT 0,
881    deliv_free_flg smallint NOT NULL DEFAULT 0,
882    search_condition text,
883    del_flg smallint NOT NULL DEFAULT 0,
884    create_date datetime NOT NULL,
885    update_date datetime NOT NULL,
886    PRIMARY KEY (campaign_id)
887) TYPE=InnoDB;
888
889CREATE TABLE dtb_campaign_detail (
890    campaign_id int NOT NULL,
891    product_id int NOT NULL,
892    campaign_point_rate numeric NOT NULL
893) TYPE=InnoDB;
894
895CREATE TABLE dtb_pagelayout (
896    page_id int auto_increment NOT NULL,
897    page_name text,
898    url text NOT NULL,
899    php_dir text,
900    tpl_dir text,
901    filename text,
902    header_chk smallint DEFAULT 1,
903    footer_chk smallint DEFAULT 1,
904    edit_flg smallint DEFAULT 1,
905    author text,
906    description text,
907    keyword text,
908    update_url text,
909    create_date datetime NOT NULL,
910    update_date datetime NOT NULL,
911    PRIMARY KEY (page_id)
912) TYPE=InnoDB;
913
914CREATE TABLE dtb_bloc (
915    bloc_id int auto_increment NOT NULL,
916    bloc_name text,
917    tpl_path text,
918    filename varchar(50) NOT NULL UNIQUE,
919    create_date datetime NOT NULL,
920    update_date datetime NOT NULL,
921    php_path text,
922    del_flg smallint NOT NULL DEFAULT 0,
923    PRIMARY KEY (bloc_id)
924) TYPE=InnoDB;
925
926CREATE TABLE dtb_blocposition (
927    page_id int NOT NULL,
928    target_id int,
929    bloc_id int,
930    bloc_row int,
931    filename text,
932    anywhere int DEFAULT 0 NOT NULL
933) TYPE=InnoDB;
934
935CREATE TABLE dtb_csv (
936    no int auto_increment,
937    csv_id int NOT NULL,
938    col text,
939    disp_name text,
940    rank int,
941    status smallint NOT NULL DEFAULT 1,
942    create_date datetime NOT NULL,
943    update_date datetime NOT NULL,
944    "convert" text,
945    PRIMARY KEY (no)
946) TYPE=InnoDB;
947
948CREATE TABLE dtb_csv_sql (
949    sql_id int auto_increment,
950    sql_name text NOT NULL,
951    csv_sql text,
952    update_date datetime NOT NULL,
953    create_date datetime NOT NULL,
954    PRIMARY KEY (sql_id)
955) TYPE=InnoDB;
956
957CREATE TABLE dtb_user_regist (
958    user_id int auto_increment NOT NULL,
959    org_name text,
960    post_name text,
961    name01 text,
962    name02 text,
963    kana01 text,
964    kana02 text,
965    email text NOT NULL,
966    url text,
967    note text,
968    secret_key varchar(50) NOT NULL UNIQUE,
969    status smallint NOT NULL,
970    del_flg smallint DEFAULT 0,
971    create_date datetime NOT NULL,
972    update_date datetime NOT NULL,
973    PRIMARY KEY (user_id)
974) TYPE=InnoDB;
975
976CREATE TABLE dtb_templates
977(
978    template_code varchar(50) NOT NULL,
979    template_name text,
980    create_date datetime NOT NULL,
981    update_date datetime NOT NULL,
982    PRIMARY KEY (template_code)
983) TYPE=InnoDB;
984
985CREATE TABLE dtb_table_comment
986(
987    id int auto_increment,
988    table_name text,
989    column_name text,
990    description text,
991    PRIMARY KEY (id)
992) TYPE=InnoDB;
993
994CREATE TABLE dtb_maker (
995    maker_id int auto_increment,
996    name text NOT NULL,
997    rank int NOT NULL DEFAULT 0,
998    creator_id int NOT NULL,
999    create_date datetime NOT NULL,
1000    update_date datetime NOT NULL,
1001    del_flg smallint NOT NULL DEFAULT 0,
1002    PRIMARY KEY (maker_id)
1003) TYPE=InnoDB;
1004
1005CREATE TABLE dtb_maker_count (
1006    maker_id int NOT NULL,
1007    product_count int NOT NULL,
1008    create_date datetime NOT NULL
1009) TYPE=InnoDB;
1010
1011
1012CREATE TABLE mtb_permission (
1013    id text,
1014    name text,
1015    rank smallint NOT NULL DEFAULT 0,
1016    PRIMARY KEY (id(32))
1017) TYPE=InnoDB;
1018
1019CREATE TABLE mtb_disable_logout (
1020    id smallint,
1021    name text,
1022    rank smallint NOT NULL DEFAULT 0,
1023    PRIMARY KEY (id)
1024) TYPE=InnoDB;
1025
1026CREATE TABLE mtb_authority (
1027    id smallint,
1028    name text,
1029    rank smallint NOT NULL DEFAULT 0,
1030    PRIMARY KEY (id)
1031) TYPE=InnoDB;
1032
1033CREATE TABLE mtb_work (
1034    id smallint,
1035    name text,
1036    rank smallint NOT NULL DEFAULT 0,
1037    PRIMARY KEY (id)
1038) TYPE=InnoDB;
1039
1040CREATE TABLE mtb_disp (
1041    id smallint,
1042    name text,
1043    rank smallint NOT NULL DEFAULT 0,
1044    PRIMARY KEY (id)
1045) TYPE=InnoDB;
1046
1047CREATE TABLE mtb_class (
1048    id smallint,
1049    name text,
1050    rank smallint NOT NULL DEFAULT 0,
1051    PRIMARY KEY (id)
1052) TYPE=InnoDB;
1053
1054CREATE TABLE mtb_srank (
1055    id smallint,
1056    name text,
1057    rank smallint NOT NULL DEFAULT 0,
1058    PRIMARY KEY (id)
1059) TYPE=InnoDB;
1060
1061CREATE TABLE mtb_status (
1062    id smallint,
1063    name text,
1064    rank smallint NOT NULL DEFAULT 0,
1065    PRIMARY KEY (id)
1066) TYPE=InnoDB;
1067
1068CREATE TABLE mtb_status_image (
1069    id smallint,
1070    name text,
1071    rank smallint NOT NULL DEFAULT 0,
1072    PRIMARY KEY (id)
1073) TYPE=InnoDB;
1074
1075CREATE TABLE mtb_allowed_tag (
1076    id smallint,
1077    name text,
1078    rank smallint NOT NULL DEFAULT 0,
1079    PRIMARY KEY (id)
1080) TYPE=InnoDB;
1081
1082CREATE TABLE mtb_page_max (
1083    id smallint,
1084    name text,
1085    rank smallint NOT NULL DEFAULT 0,
1086    PRIMARY KEY (id)
1087) TYPE=InnoDB;
1088
1089CREATE TABLE mtb_magazine_type (
1090    id smallint,
1091    name text,
1092    rank smallint NOT NULL DEFAULT 0,
1093    PRIMARY KEY (id)
1094) TYPE=InnoDB;
1095
1096CREATE TABLE mtb_mail_magazine_type (
1097    id smallint,
1098    name text,
1099    rank smallint NOT NULL DEFAULT 0,
1100    PRIMARY KEY (id)
1101) TYPE=InnoDB;
1102
1103CREATE TABLE mtb_recommend (
1104    id smallint,
1105    name text,
1106    rank smallint NOT NULL DEFAULT 0,
1107    PRIMARY KEY (id)
1108) TYPE=InnoDB;
1109
1110CREATE TABLE mtb_taxrule (
1111    id smallint,
1112    name text,
1113    rank smallint NOT NULL DEFAULT 0,
1114    PRIMARY KEY (id)
1115) TYPE=InnoDB;
1116
1117CREATE TABLE mtb_mail_template (
1118    id smallint,
1119    name text,
1120    rank smallint NOT NULL DEFAULT 0,
1121    PRIMARY KEY (id)
1122) TYPE=InnoDB;
1123
1124CREATE TABLE mtb_mail_tpl_path (
1125    id smallint,
1126    name text,
1127    rank smallint NOT NULL DEFAULT 0,
1128    PRIMARY KEY (id)
1129) TYPE=InnoDB;
1130
1131CREATE TABLE mtb_job (
1132    id smallint,
1133    name text,
1134    rank smallint NOT NULL DEFAULT 0,
1135    PRIMARY KEY (id)
1136) TYPE=InnoDB;
1137
1138CREATE TABLE mtb_reminder (
1139    id smallint,
1140    name text,
1141    rank smallint NOT NULL DEFAULT 0,
1142    PRIMARY KEY (id)
1143) TYPE=InnoDB;
1144
1145CREATE TABLE mtb_sex (
1146    id smallint,
1147    name text,
1148    rank smallint NOT NULL DEFAULT 0,
1149    PRIMARY KEY (id)
1150) TYPE=InnoDB;
1151
1152CREATE TABLE mtb_page_rows (
1153    id smallint,
1154    name text,
1155    rank smallint NOT NULL DEFAULT 0,
1156    PRIMARY KEY (id)
1157) TYPE=InnoDB;
1158
1159CREATE TABLE mtb_mail_type (
1160    id smallint,
1161    name text,
1162    rank smallint NOT NULL DEFAULT 0,
1163    PRIMARY KEY (id)
1164) TYPE=InnoDB;
1165
1166CREATE TABLE mtb_order_status (
1167    id smallint,
1168    name text,
1169    rank smallint NOT NULL DEFAULT 0,
1170    PRIMARY KEY (id)
1171) TYPE=InnoDB;
1172
1173CREATE TABLE mtb_product_status_color (
1174    id smallint,
1175    name text,
1176    rank smallint NOT NULL DEFAULT 0,
1177    PRIMARY KEY (id)
1178) TYPE=InnoDB;
1179
1180CREATE TABLE mtb_order_status_color (
1181    id smallint,
1182    name text,
1183    rank smallint NOT NULL DEFAULT 0,
1184    PRIMARY KEY (id)
1185) TYPE=InnoDB;
1186
1187CREATE TABLE mtb_wday (
1188    id smallint,
1189    name text,
1190    rank smallint NOT NULL DEFAULT 0,
1191    PRIMARY KEY (id)
1192) TYPE=InnoDB;
1193
1194CREATE TABLE mtb_delivery_date (
1195    id smallint,
1196    name text,
1197    rank smallint NOT NULL DEFAULT 0,
1198    PRIMARY KEY (id)
1199) TYPE=InnoDB;
1200
1201CREATE TABLE mtb_product_list_max (
1202    id smallint,
1203    name text,
1204    rank smallint NOT NULL DEFAULT 0,
1205    PRIMARY KEY (id)
1206) TYPE=InnoDB;
1207
1208CREATE TABLE mtb_convenience (
1209    id smallint,
1210    name text,
1211    rank smallint NOT NULL DEFAULT 0,
1212    PRIMARY KEY (id)
1213) TYPE=InnoDB;
1214
1215CREATE TABLE mtb_conveni_message (
1216    id smallint,
1217    name text,
1218    rank smallint NOT NULL DEFAULT 0,
1219    PRIMARY KEY (id)
1220) TYPE=InnoDB;
1221
1222CREATE TABLE mtb_db (
1223    id smallint,
1224    name text,
1225    rank smallint NOT NULL DEFAULT 0,
1226    PRIMARY KEY (id)
1227) TYPE=InnoDB;
1228
1229CREATE TABLE mtb_target (
1230    id smallint,
1231    name text,
1232    rank smallint NOT NULL DEFAULT 0,
1233    PRIMARY KEY (id)
1234) TYPE=InnoDB;
1235
1236CREATE TABLE mtb_review_deny_url (
1237    id smallint,
1238    name text,
1239    rank smallint NOT NULL DEFAULT 0,
1240    PRIMARY KEY (id)
1241) TYPE=InnoDB;
1242
1243CREATE TABLE mtb_track_back_status (
1244    id smallint,
1245    name text,
1246    rank smallint NOT NULL DEFAULT 0,
1247    PRIMARY KEY (id)
1248) TYPE=InnoDB;
1249
1250CREATE TABLE mtb_site_control_track_back (
1251    id smallint,
1252    name text,
1253    rank smallint NOT NULL DEFAULT 0,
1254    PRIMARY KEY (id)
1255) TYPE=InnoDB;
1256
1257CREATE TABLE mtb_site_control_affiliate (
1258    id smallint,
1259    name text,
1260    rank smallint NOT NULL DEFAULT 0,
1261    PRIMARY KEY (id)
1262) TYPE=InnoDB;
1263
1264CREATE TABLE mtb_mobile_domain (
1265    id smallint,
1266    name text,
1267    rank smallint NOT NULL DEFAULT 0,
1268    PRIMARY KEY (id)
1269) TYPE=InnoDB;
1270
1271CREATE TABLE mtb_ownersstore_err (
1272    id smallint,
1273    name text,
1274    rank smallint NOT NULL DEFAULT 0,
1275    PRIMARY KEY (id)
1276) TYPE=InnoDB;
1277
1278CREATE TABLE mtb_ownersstore_ips (
1279    id smallint,
1280    name text,
1281    rank smallint NOT NULL DEFAULT 0,
1282    PRIMARY KEY (id)
1283) TYPE=InnoDB;
1284
1285CREATE TABLE mtb_constants (
1286    id text,
1287    name text,
1288    rank smallint NOT NULL DEFAULT 0,
1289    remarks text,
1290    PRIMARY KEY (id(64))
1291) TYPE=InnoDB;
Note: See TracBrowser for help on using the repository browser.