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

Revision 18824, 29.2 KB checked in by eccuore, 11 years ago (diff)

#792(ダウンロード販売機能) vw_download_class削除、product_class_id対応(規格構成変更と並行作業中なので、作業途中の部分有)

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