source: branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql @ 20351

Revision 20351, 28.8 KB checked in by fukuda, 11 years ago (diff)

viewイラネ、メールテンプレートのムダカラムイラネ。( ゚д゚)、ペッ

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