source: branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql @ 21676

Revision 21676, 27.2 KB checked in by Seasoft, 9 years ago (diff)

#1718 (カテゴリブロックのカテゴリが多重表示される場合がある)

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