source: branches/comu-ver2/html/install/sql/create_table_mysql.sql @ 18632

Revision 18632, 29.5 KB checked in by Seasoft, 14 years ago (diff)

#715(dtb_send_customer テーブル定義を改善) 実装

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