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

Revision 18787, 29.1 KB checked in by nanasess, 14 years ago (diff)

インストーラの改善(#633)

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