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

Revision 18514, 29.4 KB checked in by Seasoft, 11 years ago (diff)

#578(都道府県ID 都道府県マスタと受注で型が異なる)を改修

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