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

Revision 18776, 29.5 KB checked in by nanasess, 14 years ago (diff)

店舗概要ページに地図を掲載する対応(#795)

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