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

Revision 18777, 29.8 KB checked in by eccuore, 14 years ago (diff)

#792(ダウンロード販売機能) 機能追加

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