source: branches/feature-module-update/html/install/sql/create_table_mysql.sql @ 16779

Revision 16779, 27.1 KB checked in by adachi, 16 years ago (diff)

#180 インストール直後に関連商品が表示されない不具合修正

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