source: branches/version-2_13-dev/html/install/sql/create_table_pgsql.sql @ 22786

Revision 22786, 29.3 KB checked in by Seasoft, 8 years ago (diff)

#2201 (SEO周りの整備)

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