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

Revision 18820, 29.3 KB checked in by nanasess, 14 years ago (diff)

#781(規格のデータベースを木構造に)

  • 規格の無い商品が品切れになってしまう不具合修正
  • 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    classcategory_id1 int NOT NULL,
768    classcategory_id2 int NOT NULL,
769    product_name text NOT NULL,
770    product_code text,
771    classcategory_name1 text,
772    classcategory_name2 text,
773    price numeric,
774    quantity numeric,
775    point_rate numeric
776) TYPE=InnoDB;
777
778CREATE TABLE mtb_pref (
779    pref_id smallint NOT NULL,
780    pref_name text,
781    rank smallint NOT NULL DEFAULT 0,
782    PRIMARY KEY (pref_id)
783) TYPE=InnoDB;
784
785CREATE TABLE dtb_member (
786    member_id int  NOT NULL,
787    name text,
788    department text,
789    login_id text NOT NULL,
790    password text NOT NULL,
791    authority smallint NOT NULL,
792    rank int NOT NULL DEFAULT 0,
793    work smallint NOT NULL DEFAULT 1,
794    del_flg smallint NOT NULL DEFAULT 0,
795    creator_id int NOT NULL,
796    update_date datetime,
797    create_date datetime NOT NULL,
798    login_date datetime,
799    PRIMARY KEY (member_id)
800) TYPE=InnoDB;
801
802CREATE TABLE dtb_bat_relate_products (
803    product_id int,
804    relate_product_id int,
805    customer_id int,
806    create_date datetime
807) TYPE=InnoDB;
808
809CREATE TABLE dtb_pagelayout (
810    page_id int  NOT NULL,
811    page_name text,
812    url text NOT NULL,
813    php_dir text,
814    tpl_dir text,
815    filename text,
816    header_chk smallint DEFAULT 1,
817    footer_chk smallint DEFAULT 1,
818    edit_flg smallint DEFAULT 1,
819    author text,
820    description text,
821    keyword text,
822    update_url text,
823    create_date datetime NOT NULL,
824    update_date datetime NOT NULL,
825    PRIMARY KEY (page_id)
826) TYPE=InnoDB;
827
828CREATE TABLE dtb_bloc (
829    bloc_id int  NOT NULL,
830    bloc_name text,
831    tpl_path text,
832    filename varchar(50) NOT NULL UNIQUE,
833    create_date datetime NOT NULL,
834    update_date datetime NOT NULL,
835    php_path text,
836    del_flg smallint NOT NULL DEFAULT 0,
837    PRIMARY KEY (bloc_id)
838) TYPE=InnoDB;
839
840CREATE TABLE dtb_blocposition (
841    page_id int NOT NULL,
842    target_id int,
843    bloc_id int,
844    bloc_row int,
845    filename text,
846    anywhere int DEFAULT 0 NOT NULL
847) TYPE=InnoDB;
848
849CREATE TABLE dtb_csv (
850    no int ,
851    csv_id int NOT NULL,
852    col text,
853    disp_name text,
854    rank int,
855    status smallint NOT NULL DEFAULT 1,
856    create_date datetime NOT NULL,
857    update_date datetime NOT NULL,
858    mb_convert_kana_option text,
859    PRIMARY KEY (no)
860) TYPE=InnoDB;
861
862CREATE TABLE dtb_csv_sql (
863    sql_id int ,
864    sql_name text NOT NULL,
865    csv_sql text,
866    update_date datetime NOT NULL,
867    create_date datetime NOT NULL,
868    PRIMARY KEY (sql_id)
869) TYPE=InnoDB;
870
871CREATE TABLE dtb_templates
872(
873    template_code varchar(50) NOT NULL,
874    template_name text,
875    create_date datetime NOT NULL,
876    update_date datetime NOT NULL,
877    PRIMARY KEY (template_code)
878) TYPE=InnoDB;
879
880CREATE TABLE dtb_table_comment
881(
882    id int ,
883    table_name text,
884    column_name text,
885    description text,
886    PRIMARY KEY (id)
887) TYPE=InnoDB;
888
889CREATE TABLE dtb_maker (
890    maker_id int ,
891    name text NOT NULL,
892    rank int NOT NULL DEFAULT 0,
893    creator_id int NOT NULL,
894    create_date datetime NOT NULL,
895    update_date datetime NOT NULL,
896    del_flg smallint NOT NULL DEFAULT 0,
897    PRIMARY KEY (maker_id)
898) TYPE=InnoDB;
899
900CREATE TABLE dtb_maker_count (
901    maker_id int NOT NULL,
902    product_count int NOT NULL,
903    create_date datetime NOT NULL
904) TYPE=InnoDB;
905
906
907CREATE TABLE mtb_permission (
908    id text,
909    name text,
910    rank smallint NOT NULL DEFAULT 0,
911    PRIMARY KEY (id(32))
912) TYPE=InnoDB;
913
914CREATE TABLE mtb_disable_logout (
915    id smallint,
916    name text,
917    rank smallint NOT NULL DEFAULT 0,
918    PRIMARY KEY (id)
919) TYPE=InnoDB;
920
921CREATE TABLE mtb_authority (
922    id smallint,
923    name text,
924    rank smallint NOT NULL DEFAULT 0,
925    PRIMARY KEY (id)
926) TYPE=InnoDB;
927
928CREATE TABLE mtb_work (
929    id smallint,
930    name text,
931    rank smallint NOT NULL DEFAULT 0,
932    PRIMARY KEY (id)
933) TYPE=InnoDB;
934
935CREATE TABLE mtb_disp (
936    id smallint,
937    name text,
938    rank smallint NOT NULL DEFAULT 0,
939    PRIMARY KEY (id)
940) TYPE=InnoDB;
941
942CREATE TABLE mtb_class (
943    id smallint,
944    name text,
945    rank smallint NOT NULL DEFAULT 0,
946    PRIMARY KEY (id)
947) TYPE=InnoDB;
948
949CREATE TABLE mtb_status (
950    id smallint,
951    name text,
952    rank smallint NOT NULL DEFAULT 0,
953    PRIMARY KEY (id)
954) TYPE=InnoDB;
955
956CREATE TABLE mtb_status_image (
957    id smallint,
958    name text,
959    rank smallint NOT NULL DEFAULT 0,
960    PRIMARY KEY (id)
961) TYPE=InnoDB;
962
963CREATE TABLE mtb_allowed_tag (
964    id smallint,
965    name text,
966    rank smallint NOT NULL DEFAULT 0,
967    PRIMARY KEY (id)
968) TYPE=InnoDB;
969
970CREATE TABLE mtb_page_max (
971    id smallint,
972    name text,
973    rank smallint NOT NULL DEFAULT 0,
974    PRIMARY KEY (id)
975) TYPE=InnoDB;
976
977CREATE TABLE mtb_magazine_type (
978    id smallint,
979    name text,
980    rank smallint NOT NULL DEFAULT 0,
981    PRIMARY KEY (id)
982) TYPE=InnoDB;
983
984CREATE TABLE mtb_mail_magazine_type (
985    id smallint,
986    name text,
987    rank smallint NOT NULL DEFAULT 0,
988    PRIMARY KEY (id)
989) TYPE=InnoDB;
990
991CREATE TABLE mtb_recommend (
992    id smallint,
993    name text,
994    rank smallint NOT NULL DEFAULT 0,
995    PRIMARY KEY (id)
996) TYPE=InnoDB;
997
998CREATE TABLE mtb_taxrule (
999    id smallint,
1000    name text,
1001    rank smallint NOT NULL DEFAULT 0,
1002    PRIMARY KEY (id)
1003) TYPE=InnoDB;
1004
1005CREATE TABLE mtb_mail_template (
1006    id smallint,
1007    name text,
1008    rank smallint NOT NULL DEFAULT 0,
1009    PRIMARY KEY (id)
1010) TYPE=InnoDB;
1011
1012CREATE TABLE mtb_mail_tpl_path (
1013    id smallint,
1014    name text,
1015    rank smallint NOT NULL DEFAULT 0,
1016    PRIMARY KEY (id)
1017) TYPE=InnoDB;
1018
1019CREATE TABLE mtb_job (
1020    id smallint,
1021    name text,
1022    rank smallint NOT NULL DEFAULT 0,
1023    PRIMARY KEY (id)
1024) TYPE=InnoDB;
1025
1026CREATE TABLE mtb_reminder (
1027    id smallint,
1028    name text,
1029    rank smallint NOT NULL DEFAULT 0,
1030    PRIMARY KEY (id)
1031) TYPE=InnoDB;
1032
1033CREATE TABLE mtb_sex (
1034    id smallint,
1035    name text,
1036    rank smallint NOT NULL DEFAULT 0,
1037    PRIMARY KEY (id)
1038) TYPE=InnoDB;
1039
1040CREATE TABLE mtb_page_rows (
1041    id smallint,
1042    name text,
1043    rank smallint NOT NULL DEFAULT 0,
1044    PRIMARY KEY (id)
1045) TYPE=InnoDB;
1046
1047CREATE TABLE mtb_mail_type (
1048    id smallint,
1049    name text,
1050    rank smallint NOT NULL DEFAULT 0,
1051    PRIMARY KEY (id)
1052) TYPE=InnoDB;
1053
1054CREATE TABLE mtb_order_status (
1055    id smallint,
1056    name text,
1057    rank smallint NOT NULL DEFAULT 0,
1058    PRIMARY KEY (id)
1059) TYPE=InnoDB;
1060
1061CREATE TABLE mtb_product_status_color (
1062    id smallint,
1063    name text,
1064    rank smallint NOT NULL DEFAULT 0,
1065    PRIMARY KEY (id)
1066) TYPE=InnoDB;
1067
1068CREATE TABLE mtb_order_status_color (
1069    id smallint,
1070    name text,
1071    rank smallint NOT NULL DEFAULT 0,
1072    PRIMARY KEY (id)
1073) TYPE=InnoDB;
1074
1075CREATE TABLE mtb_wday (
1076    id smallint,
1077    name text,
1078    rank smallint NOT NULL DEFAULT 0,
1079    PRIMARY KEY (id)
1080) TYPE=InnoDB;
1081
1082CREATE TABLE mtb_delivery_date (
1083    id smallint,
1084    name text,
1085    rank smallint NOT NULL DEFAULT 0,
1086    PRIMARY KEY (id)
1087) TYPE=InnoDB;
1088
1089CREATE TABLE mtb_product_list_max (
1090    id smallint,
1091    name text,
1092    rank smallint NOT NULL DEFAULT 0,
1093    PRIMARY KEY (id)
1094) TYPE=InnoDB;
1095
1096CREATE TABLE mtb_convenience (
1097    id smallint,
1098    name text,
1099    rank smallint NOT NULL DEFAULT 0,
1100    PRIMARY KEY (id)
1101) TYPE=InnoDB;
1102
1103CREATE TABLE mtb_conveni_message (
1104    id smallint,
1105    name text,
1106    rank smallint NOT NULL DEFAULT 0,
1107    PRIMARY KEY (id)
1108) TYPE=InnoDB;
1109
1110CREATE TABLE mtb_db (
1111    id smallint,
1112    name text,
1113    rank smallint NOT NULL DEFAULT 0,
1114    PRIMARY KEY (id)
1115) TYPE=InnoDB;
1116
1117CREATE TABLE mtb_target (
1118    id smallint,
1119    name text,
1120    rank smallint NOT NULL DEFAULT 0,
1121    PRIMARY KEY (id)
1122) TYPE=InnoDB;
1123
1124CREATE TABLE mtb_review_deny_url (
1125    id smallint,
1126    name text,
1127    rank smallint NOT NULL DEFAULT 0,
1128    PRIMARY KEY (id)
1129) TYPE=InnoDB;
1130
1131CREATE TABLE mtb_track_back_status (
1132    id smallint,
1133    name text,
1134    rank smallint NOT NULL DEFAULT 0,
1135    PRIMARY KEY (id)
1136) TYPE=InnoDB;
1137
1138CREATE TABLE mtb_site_control_track_back (
1139    id smallint,
1140    name text,
1141    rank smallint NOT NULL DEFAULT 0,
1142    PRIMARY KEY (id)
1143) TYPE=InnoDB;
1144
1145CREATE TABLE mtb_site_control_affiliate (
1146    id smallint,
1147    name text,
1148    rank smallint NOT NULL DEFAULT 0,
1149    PRIMARY KEY (id)
1150) TYPE=InnoDB;
1151
1152CREATE TABLE mtb_mobile_domain (
1153    id smallint,
1154    name text,
1155    rank smallint NOT NULL DEFAULT 0,
1156    PRIMARY KEY (id)
1157) TYPE=InnoDB;
1158
1159CREATE TABLE mtb_ownersstore_err (
1160    id smallint,
1161    name text,
1162    rank smallint NOT NULL DEFAULT 0,
1163    PRIMARY KEY (id)
1164) TYPE=InnoDB;
1165
1166CREATE TABLE mtb_ownersstore_ips (
1167    id smallint,
1168    name text,
1169    rank smallint NOT NULL DEFAULT 0,
1170    PRIMARY KEY (id)
1171) TYPE=InnoDB;
1172
1173CREATE TABLE mtb_constants (
1174    id text,
1175    name text,
1176    rank smallint NOT NULL DEFAULT 0,
1177    remarks text,
1178    PRIMARY KEY (id(64))
1179) TYPE=InnoDB;
1180
1181CREATE TABLE mtb_down (
1182    id int2,
1183    name text,
1184    rank int2 NOT NULL,
1185    PRIMARY KEY (id)
1186) TYPE=InnoDB;
1187
1188CREATE TABLE dtb_mobile_ext_session_id (
1189    session_id text NOT NULL,
1190    param_key text,
1191    param_value text,
1192    url text,
1193    create_date timestamp NOT NULL DEFAULT now()
1194);
1195
1196CREATE TABLE dtb_mobile_kara_mail (
1197    kara_mail_id serial PRIMARY KEY,
1198    session_id text NOT NULL,
1199    token text NOT NULL,
1200    next_url text NOT NULL,
1201    create_date timestamp NOT NULL DEFAULT now(),
1202    email text,
1203    receive_date timestamp
1204);
1205
1206CREATE TABLE dtb_module (
1207    module_id int NOT NULL UNIQUE,
1208    module_code text NOT NULL,
1209    module_name text NOT NULL,
1210    sub_data text,
1211    auto_update_flg smallint NOT NULL DEFAULT 0,
1212    del_flg smallint NOT NULL DEFAULT 0,
1213    create_date datetime NOT NULL ,
1214    update_date datetime NOT NULL
1215) TYPE=InnoDB;
1216
1217CREATE TABLE dtb_session (
1218    sess_id varchar(50) NOT NULL,
1219    sess_data text,
1220    create_date datetime NOT NULL,
1221    update_date datetime NOT NULL,
1222    PRIMARY KEY (sess_id)
1223) TYPE=InnoDB;
1224
1225CREATE TABLE dtb_site_control (
1226    control_id int  NOT NULL,
1227    control_title varchar(255) ,
1228    control_text text ,
1229    control_flg int NOT NULL DEFAULT 2,
1230    del_flg int NOT NULL DEFAULT 0,
1231    memo text ,
1232    create_date datetime NOT NULL,
1233    update_date datetime NOT NULL,
1234    PRIMARY KEY  (control_id)
1235) TYPE=InnoDB;
1236
1237CREATE TABLE dtb_trackback (
1238    trackback_id int  NOT NULL,
1239    product_id int NOT NULL,
1240    blog_name varchar(255) NOT NULL DEFAULT '',
1241    title varchar(255) NOT NULL DEFAULT '',
1242    excerpt text NOT NULL ,
1243    url text NOT NULL ,
1244    status int NOT NULL DEFAULT 2,
1245    del_flg int NOT NULL DEFAULT 0,
1246    create_date datetime NOT NULL,
1247    update_date datetime NOT NULL,
1248    PRIMARY KEY (trackback_id)
1249) TYPE=InnoDB;
1250
1251CREATE TABLE dtb_bkup (
1252    bkup_name varchar(50),
1253    bkup_memo text,
1254    create_date datetime,
1255    PRIMARY KEY (bkup_name)
1256) TYPE=InnoDB;
1257
1258CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
1259CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1260CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1261CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1262CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
1263CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
1264CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
1265CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1266CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token(64));
1267CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
1268CREATE 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.