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

Revision 21491, 27.0 KB checked in by h_yoshimoto, 10 years ago (diff)

#1603 dtb_plugin dtb_plugin_hookpointのシーケンステーブルを追加。

  • 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    payment_id int NOT NULL,
152    deliv_id int NOT NULL,
153    rank int,
154    PRIMARY KEY (payment_id, deliv_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    class_combination_id int,
308    product_type_id int NOT NULL DEFAULT 0,
309    product_code text,
310    stock numeric,
311    stock_unlimited smallint NOT NULL DEFAULT 0,
312    sale_limit numeric,
313    price01 numeric,
314    price02 numeric NOT NULL,
315    deliv_fee numeric,
316    point_rate numeric,
317    creator_id int NOT NULL,
318    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
319    update_date timestamp NOT NULL,
320    down_filename text,
321    down_realfilename text,
322    del_flg smallint NOT NULL DEFAULT 0,
323    PRIMARY KEY (product_class_id)
324);
325
326CREATE TABLE dtb_class (
327    class_id int NOT NULL,
328    name text,
329    rank int,
330    creator_id int NOT NULL,
331    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
332    update_date timestamp NOT NULL,
333    del_flg smallint NOT NULL DEFAULT 0,
334    PRIMARY KEY (class_id)
335);
336
337CREATE TABLE dtb_classcategory (
338    classcategory_id int NOT NULL,
339    name text,
340    class_id int NOT NULL,
341    rank int,
342    creator_id int NOT NULL,
343    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
344    update_date timestamp NOT NULL,
345    del_flg smallint NOT NULL DEFAULT 0,
346    PRIMARY KEY (classcategory_id)
347);
348
349CREATE TABLE dtb_class_combination (
350    class_combination_id int NOT NULL,
351    parent_class_combination_id int,
352    classcategory_id int NOT NULL,
353    level int,
354    PRIMARY KEY (class_combination_id)
355);
356
357CREATE TABLE dtb_category (
358    category_id int NOT NULL,
359    category_name text,
360    parent_category_id int NOT NULL DEFAULT 0,
361    level int NOT NULL,
362    rank int,
363    creator_id int NOT NULL,
364    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
365    update_date timestamp NOT NULL,
366    del_flg smallint NOT NULL DEFAULT 0,
367    PRIMARY KEY (category_id)
368);
369
370CREATE TABLE dtb_product_categories (
371    product_id int NOT NULL,
372    category_id int NOT NULL,
373    rank int NOT NULL,
374    PRIMARY KEY(product_id, category_id)
375);
376
377CREATE TABLE dtb_product_status (
378    product_status_id smallint NOT NULL,
379    product_id int NOT NULL,
380    creator_id int NOT NULL,
381    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
382    update_date timestamp NOT NULL,
383    del_flg smallint NOT NULL DEFAULT 0,
384    PRIMARY KEY (product_status_id, product_id)
385);
386
387CREATE TABLE dtb_recommend_products (
388    product_id int NOT NULL,
389    recommend_product_id int NOT NULL,
390    rank int NOT NULL,
391    comment text,
392    status smallint NOT NULL DEFAULT 0,
393    creator_id int NOT NULL,
394    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
395    update_date timestamp NOT NULL
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);
429
430CREATE TABLE dtb_category_total_count (
431    category_id int NOT NULL,
432    product_count int,
433    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
434);
435
436CREATE TABLE dtb_news (
437    news_id int NOT NULL,
438    news_date timestamp,
439    rank int,
440    news_title text NOT NULL,
441    news_comment text,
442    news_url text,
443    news_select smallint NOT NULL DEFAULT 0,
444    link_method text,
445    creator_id int NOT NULL,
446    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
447    update_date timestamp NOT NULL,
448    del_flg smallint NOT NULL DEFAULT 0,
449    PRIMARY KEY (news_id)
450);
451
452CREATE TABLE dtb_best_products (
453    best_id int NOT NULL,
454    category_id int NOT NULL,
455    rank int NOT NULL DEFAULT 0,
456    product_id int NOT NULL,
457    title text,
458    comment text,
459    creator_id int NOT NULL,
460    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
461    update_date timestamp NOT NULL,
462    del_flg smallint NOT NULL DEFAULT 0,
463    PRIMARY KEY (best_id)
464);
465
466CREATE TABLE dtb_mail_history (
467    send_id int NOT NULL,
468    order_id int NOT NULL,
469    send_date timestamp,
470    template_id int,
471    creator_id int NOT NULL,
472    subject text,
473    mail_body text,
474    PRIMARY KEY (send_id)
475);
476
477CREATE TABLE dtb_customer (
478    customer_id int NOT NULL,
479    name01 text NOT NULL,
480    name02 text NOT NULL,
481    kana01 text NOT NULL,
482    kana02 text NOT NULL,
483    zip01 text,
484    zip02 text,
485    pref smallint,
486    addr01 text,
487    addr02 text,
488    email text NOT NULL,
489    email_mobile text,
490    tel01 text,
491    tel02 text,
492    tel03 text,
493    fax01 text,
494    fax02 text,
495    fax03 text,
496    sex smallint,
497    job smallint,
498    birth timestamp,
499    password text,
500    reminder smallint,
501    reminder_answer text,
502    salt text,
503    secret_key text NOT NULL UNIQUE,
504    first_buy_date timestamp,
505    last_buy_date timestamp,
506    buy_times numeric DEFAULT 0,
507    buy_total numeric DEFAULT 0,
508    point numeric DEFAULT 0,
509    note text,
510    status smallint NOT NULL DEFAULT 1,
511    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
512    update_date timestamp NOT NULL,
513    del_flg smallint NOT NULL DEFAULT 0,
514    mobile_phone_id text,
515    mailmaga_flg smallint,
516    PRIMARY KEY (customer_id)
517);
518
519CREATE TABLE dtb_order (
520    order_id int NOT NULL,
521    order_temp_id text,
522    customer_id int NOT NULL,
523    message text,
524    order_name01 text,
525    order_name02 text,
526    order_kana01 text,
527    order_kana02 text,
528    order_email text,
529    order_tel01 text,
530    order_tel02 text,
531    order_tel03 text,
532    order_fax01 text,
533    order_fax02 text,
534    order_fax03 text,
535    order_zip01 text,
536    order_zip02 text,
537    order_pref smallint,
538    order_addr01 text,
539    order_addr02 text,
540    order_sex smallint,
541    order_birth timestamp,
542    order_job int,
543    subtotal numeric,
544    discount numeric,
545    deliv_id int,
546    deliv_fee numeric,
547    charge numeric,
548    use_point numeric,
549    add_point numeric,
550    birth_point numeric DEFAULT 0,
551    tax numeric,
552    total numeric,
553    payment_total numeric,
554    payment_id int,
555    payment_method text,
556    note text,
557    status smallint,
558    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
559    update_date timestamp NOT NULL,
560    commit_date timestamp,
561    payment_date timestamp,
562    device_type_id int,
563    del_flg smallint NOT NULL DEFAULT 0,
564    memo01 text,
565    memo02 text,
566    memo03 text,
567    memo04 text,
568    memo05 text,
569    memo06 text,
570    memo07 text,
571    memo08 text,
572    memo09 text,
573    memo10 text,
574    PRIMARY KEY (order_id)
575);
576
577CREATE TABLE dtb_order_temp (
578    order_temp_id text NOT NULL,
579    customer_id int NOT NULL,
580    message text,
581    order_name01 text,
582    order_name02 text,
583    order_kana01 text,
584    order_kana02 text,
585    order_email text,
586    order_tel01 text,
587    order_tel02 text,
588    order_tel03 text,
589    order_fax01 text,
590    order_fax02 text,
591    order_fax03 text,
592    order_zip01 text,
593    order_zip02 text,
594    order_pref smallint,
595    order_addr01 text,
596    order_addr02 text,
597    order_sex smallint,
598    order_birth timestamp,
599    order_job int,
600    subtotal numeric,
601    discount numeric,
602    deliv_id int,
603    deliv_fee numeric,
604    charge numeric,
605    use_point numeric,
606    add_point numeric,
607    birth_point numeric DEFAULT 0,
608    tax numeric,
609    total numeric,
610    payment_total numeric,
611    payment_id int,
612    payment_method text,
613    note text,
614    mail_flag smallint,
615    status smallint,
616    deliv_check smallint,
617    point_check smallint,
618    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
619    update_date timestamp NOT NULL,
620    device_type_id int,
621    del_flg smallint NOT NULL DEFAULT 0,
622    order_id int,
623    memo01 text,
624    memo02 text,
625    memo03 text,
626    memo04 text,
627    memo05 text,
628    memo06 text,
629    memo07 text,
630    memo08 text,
631    memo09 text,
632    memo10 text,
633    session text
634);
635
636CREATE TABLE dtb_shipping (
637    shipping_id int NOT NULL,
638    order_id int NOT NULL,
639    shipping_name01 text,
640    shipping_name02 text,
641    shipping_kana01 text,
642    shipping_kana02 text,
643    shipping_tel01 text,
644    shipping_tel02 text,
645    shipping_tel03 text,
646    shipping_fax01 text,
647    shipping_fax02 text,
648    shipping_fax03 text,
649    shipping_pref smallint,
650    shipping_zip01 text,
651    shipping_zip02 text,
652    shipping_addr01 text,
653    shipping_addr02 text,
654    deliv_id int NOT NULL,
655    time_id int,
656    shipping_time text,
657    shipping_num text,
658    shipping_date timestamp,
659    shipping_commit_date timestamp,
660    rank int,
661    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
662    update_date timestamp NOT NULL,
663    del_flg smallint NOT NULL DEFAULT 0,
664    PRIMARY KEY (shipping_id, order_id)
665);
666
667CREATE TABLE dtb_shipment_item (
668    shipping_id int NOT NULL,
669    product_class_id int NOT NULL,
670    order_id int NOT NULL,
671    product_name text NOT NULL,
672    product_code text,
673    classcategory_name1 text,
674    classcategory_name2 text,
675    price numeric,
676    quantity numeric,
677    PRIMARY KEY (shipping_id, product_class_id, order_id)
678);
679
680CREATE TABLE dtb_other_deliv (
681    other_deliv_id int NOT NULL,
682    customer_id int NOT NULL,
683    name01 text,
684    name02 text,
685    kana01 text,
686    kana02 text,
687    zip01 text,
688    zip02 text,
689    pref smallint,
690    addr01 text,
691    addr02 text,
692    tel01 text,
693    tel02 text,
694    tel03 text,
695    PRIMARY KEY (other_deliv_id)
696);
697
698CREATE TABLE dtb_order_detail (
699    order_detail_id int NOT NULL,
700    order_id int NOT NULL,
701    product_id int NOT NULL,
702    product_class_id int NOT NULL,
703    product_name text NOT NULL,
704    product_code text,
705    classcategory_name1 text,
706    classcategory_name2 text,
707    price numeric,
708    quantity numeric,
709    point_rate numeric,
710    PRIMARY KEY (order_detail_id)
711);
712
713CREATE TABLE dtb_member (
714    member_id int NOT NULL,
715    name text,
716    department text,
717    login_id text NOT NULL,
718    password text NOT NULL,
719    salt text NOT NULL,
720    authority smallint NOT NULL,
721    rank int NOT NULL DEFAULT 0,
722    work smallint NOT NULL DEFAULT 1,
723    del_flg smallint NOT NULL DEFAULT 0,
724    creator_id int NOT NULL,
725    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
726    update_date timestamp NOT NULL,
727    login_date timestamp,
728    PRIMARY KEY (member_id)
729);
730
731CREATE TABLE dtb_pagelayout (
732    device_type_id int NOT NULL,
733    page_id int NOT NULL,
734    page_name text,
735    url text NOT NULL,
736    filename text,
737    header_chk smallint DEFAULT 1,
738    footer_chk smallint DEFAULT 1,
739    edit_flg smallint DEFAULT 1,
740    author text,
741    description text,
742    keyword text,
743    update_url text,
744    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
745    update_date timestamp NOT NULL,
746    PRIMARY KEY (device_type_id, page_id)
747);
748
749CREATE TABLE dtb_bloc (
750    device_type_id int NOT NULL,
751    bloc_id int NOT NULL,
752    bloc_name text,
753    tpl_path text,
754    filename text NOT NULL,
755    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
756    update_date timestamp NOT NULL,
757    php_path text,
758    deletable_flg smallint NOT NULL DEFAULT 1,
759    PRIMARY KEY (device_type_id, bloc_id),
760    UNIQUE (device_type_id, filename)
761);
762
763CREATE TABLE dtb_blocposition (
764    device_type_id int NOT NULL,
765    page_id int NOT NULL,
766    target_id int,
767    bloc_id int,
768    bloc_row int,
769    anywhere smallint DEFAULT 0 NOT NULL,
770    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
771);
772
773CREATE TABLE dtb_csv (
774    no int,
775    csv_id int NOT NULL,
776    col text,
777    disp_name text,
778    rank int,
779    rw_flg smallint DEFAULT 1,
780    status smallint NOT NULL DEFAULT 1,
781    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
782    update_date timestamp NOT NULL,
783    mb_convert_kana_option text,
784    size_const_type text,
785    error_check_types text,
786    PRIMARY KEY (no)
787);
788
789CREATE TABLE dtb_csv_sql (
790    sql_id int,
791    sql_name text NOT NULL,
792    csv_sql text,
793    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
794    update_date timestamp NOT NULL,
795    PRIMARY KEY (sql_id)
796);
797
798CREATE TABLE dtb_templates (
799    template_code text NOT NULL,
800    device_type_id int NOT NULL,
801    template_name text,
802    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
803    update_date timestamp NOT NULL,
804    PRIMARY KEY (template_code)
805);
806
807CREATE TABLE dtb_maker (
808    maker_id int NOT NULL,
809    name text NOT NULL,
810    rank int NOT NULL DEFAULT 0,
811    creator_id int NOT NULL,
812    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
813    update_date timestamp NOT NULL,
814    del_flg smallint NOT NULL DEFAULT 0,
815    PRIMARY KEY (maker_id)
816);
817
818CREATE TABLE dtb_maker_count (
819    maker_id int NOT NULL,
820    product_count int NOT NULL,
821    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
822);
823
824CREATE TABLE mtb_pref (
825    id smallint,
826    name text,
827    rank smallint NOT NULL DEFAULT 0,
828    PRIMARY KEY (id)
829);
830
831CREATE TABLE mtb_permission (
832    id text,
833    name text,
834    rank smallint NOT NULL DEFAULT 0,
835    PRIMARY KEY (id)
836);
837
838CREATE TABLE mtb_disable_logout (
839    id smallint,
840    name text,
841    rank smallint NOT NULL DEFAULT 0,
842    PRIMARY KEY (id)
843);
844
845CREATE TABLE mtb_authority (
846    id smallint,
847    name text,
848    rank smallint NOT NULL DEFAULT 0,
849    PRIMARY KEY (id)
850);
851
852CREATE TABLE mtb_auth_excludes (
853    id smallint,
854    name text,
855    rank smallint NOT NULL DEFAULT 0,
856    PRIMARY KEY (id)
857);
858
859CREATE TABLE mtb_work (
860    id smallint,
861    name text,
862    rank smallint NOT NULL DEFAULT 0,
863    PRIMARY KEY (id)
864);
865
866CREATE TABLE mtb_disp (
867    id smallint,
868    name text,
869    rank smallint NOT NULL DEFAULT 0,
870    PRIMARY KEY (id)
871);
872
873CREATE TABLE mtb_class (
874    id smallint,
875    name text,
876    rank smallint NOT NULL DEFAULT 0,
877    PRIMARY KEY (id)
878);
879
880CREATE TABLE mtb_status (
881    id smallint,
882    name text,
883    rank smallint NOT NULL DEFAULT 0,
884    PRIMARY KEY (id)
885);
886
887CREATE TABLE mtb_status_image (
888    id smallint,
889    name text,
890    rank smallint NOT NULL DEFAULT 0,
891    PRIMARY KEY (id)
892);
893
894CREATE TABLE mtb_allowed_tag (
895    id smallint,
896    name text,
897    rank smallint NOT NULL DEFAULT 0,
898    PRIMARY KEY (id)
899);
900
901CREATE TABLE mtb_page_max (
902    id smallint,
903    name text,
904    rank smallint NOT NULL DEFAULT 0,
905    PRIMARY KEY (id)
906);
907
908CREATE TABLE mtb_magazine_type (
909    id smallint,
910    name text,
911    rank smallint NOT NULL DEFAULT 0,
912    PRIMARY KEY (id)
913);
914
915CREATE TABLE mtb_mail_magazine_type (
916    id smallint,
917    name text,
918    rank smallint NOT NULL DEFAULT 0,
919    PRIMARY KEY (id)
920);
921
922CREATE TABLE mtb_recommend (
923    id smallint,
924    name text,
925    rank smallint NOT NULL DEFAULT 0,
926    PRIMARY KEY (id)
927);
928
929CREATE TABLE mtb_taxrule (
930    id smallint,
931    name text,
932    rank smallint NOT NULL DEFAULT 0,
933    PRIMARY KEY (id)
934);
935
936CREATE TABLE mtb_mail_template (
937    id smallint,
938    name text,
939    rank smallint NOT NULL DEFAULT 0,
940    PRIMARY KEY (id)
941);
942
943CREATE TABLE mtb_mail_tpl_path (
944    id smallint,
945    name text,
946    rank smallint NOT NULL DEFAULT 0,
947    PRIMARY KEY (id)
948);
949
950CREATE TABLE mtb_job (
951    id smallint,
952    name text,
953    rank smallint NOT NULL DEFAULT 0,
954    PRIMARY KEY (id)
955);
956
957CREATE TABLE mtb_reminder (
958    id smallint,
959    name text,
960    rank smallint NOT NULL DEFAULT 0,
961    PRIMARY KEY (id)
962);
963
964CREATE TABLE mtb_sex (
965    id smallint,
966    name text,
967    rank smallint NOT NULL DEFAULT 0,
968    PRIMARY KEY (id)
969);
970
971CREATE TABLE mtb_customer_status (
972    id smallint,
973    name text,
974    rank smallint NOT NULL DEFAULT 0,
975    PRIMARY KEY (id)
976);
977
978CREATE TABLE mtb_mail_type (
979    id smallint,
980    name text,
981    rank smallint NOT NULL DEFAULT 0,
982    PRIMARY KEY (id)
983);
984
985CREATE TABLE mtb_order_status (
986    id smallint,
987    name text,
988    rank smallint NOT NULL DEFAULT 0,
989    PRIMARY KEY (id)
990);
991
992CREATE TABLE mtb_product_status_color (
993    id smallint,
994    name text,
995    rank smallint NOT NULL DEFAULT 0,
996    PRIMARY KEY (id)
997);
998
999CREATE TABLE mtb_order_status_color (
1000    id smallint,
1001    name text,
1002    rank smallint NOT NULL DEFAULT 0,
1003    PRIMARY KEY (id)
1004);
1005
1006CREATE TABLE mtb_wday (
1007    id smallint,
1008    name text,
1009    rank smallint NOT NULL DEFAULT 0,
1010    PRIMARY KEY (id)
1011);
1012
1013CREATE TABLE mtb_delivery_date (
1014    id smallint,
1015    name text,
1016    rank smallint NOT NULL DEFAULT 0,
1017    PRIMARY KEY (id)
1018);
1019
1020CREATE TABLE mtb_product_list_max (
1021    id smallint,
1022    name text,
1023    rank smallint NOT NULL DEFAULT 0,
1024    PRIMARY KEY (id)
1025);
1026
1027CREATE TABLE mtb_db (
1028    id smallint,
1029    name text,
1030    rank smallint NOT NULL DEFAULT 0,
1031    PRIMARY KEY (id)
1032);
1033
1034CREATE TABLE mtb_target (
1035    id smallint,
1036    name text,
1037    rank smallint NOT NULL DEFAULT 0,
1038    PRIMARY KEY (id)
1039);
1040
1041CREATE TABLE mtb_review_deny_url (
1042    id smallint,
1043    name text,
1044    rank smallint NOT NULL DEFAULT 0,
1045    PRIMARY KEY (id)
1046);
1047
1048CREATE TABLE mtb_mobile_domain (
1049    id smallint,
1050    name text,
1051    rank smallint NOT NULL DEFAULT 0,
1052    PRIMARY KEY (id)
1053);
1054
1055CREATE TABLE mtb_ownersstore_err (
1056    id smallint,
1057    name text,
1058    rank smallint NOT NULL DEFAULT 0,
1059    PRIMARY KEY (id)
1060);
1061
1062CREATE TABLE mtb_ownersstore_ips (
1063    id smallint,
1064    name text,
1065    rank smallint NOT NULL DEFAULT 0,
1066    PRIMARY KEY (id)
1067);
1068
1069CREATE TABLE mtb_constants (
1070    id text,
1071    name text,
1072    rank smallint NOT NULL DEFAULT 0,
1073    remarks text,
1074    PRIMARY KEY (id)
1075);
1076
1077CREATE TABLE mtb_product_type (
1078    id smallint,
1079    name text,
1080    rank smallint NOT NULL,
1081    PRIMARY KEY (id)
1082);
1083
1084CREATE TABLE mtb_device_type (
1085    id smallint,
1086    name text,
1087    rank smallint NOT NULL,
1088    PRIMARY KEY (id)
1089);
1090
1091CREATE TABLE dtb_mobile_ext_session_id (
1092    session_id text NOT NULL,
1093    param_key text,
1094    param_value text,
1095    url text,
1096    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
1097);
1098
1099CREATE TABLE dtb_module (
1100    module_id int NOT NULL UNIQUE,
1101    module_code text NOT NULL,
1102    module_name text NOT NULL,
1103    sub_data text,
1104    auto_update_flg smallint NOT NULL DEFAULT 0,
1105    del_flg smallint NOT NULL DEFAULT 0,
1106    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1107    update_date timestamp NOT NULL
1108);
1109
1110CREATE TABLE dtb_session (
1111    sess_id text NOT NULL,
1112    sess_data text,
1113    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1114    update_date timestamp NOT NULL,
1115    PRIMARY KEY (sess_id)
1116);
1117
1118CREATE TABLE dtb_bkup (
1119    bkup_name   text,
1120    bkup_memo   text,
1121    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1122    PRIMARY KEY (bkup_name)
1123);
1124
1125CREATE TABLE dtb_plugin (
1126    plugin_id int NOT NULL,
1127    plugin_name text NOT NULL,
1128    plugin_code text NOT NULL,
1129    author text,
1130    author_site_url text,
1131    plugin_site_url text,
1132    plugin_version text,
1133    compliant_version text,   
1134    plugin_description text,
1135    rank int NOT NULL DEFAULT 0,
1136    enable smallint NOT NULL DEFAULT 0,
1137    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1138    update_date timestamp NOT NULL,
1139    PRIMARY KEY (plugin_id)
1140);
1141
1142CREATE TABLE dtb_plugin_hookpoint (
1143    id int NOT NULL,
1144    plugin_id int NOT NULL,
1145    hook_point text NOT NULL,
1146    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1147    update_date timestamp NOT NULL,
1148    PRIMARY KEY (plugin_id)
1149);
1150
1151
1152CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id);
1153CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1154CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1155CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1156CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key);
1157CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value);
1158CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url);
1159CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1160
1161CREATE TABLE dtb_index_list (
1162    table_name text NOT NULL,
1163    column_name text NOT NULL,
1164    recommend_flg smallint NOT NULL DEFAULT 0,
1165    recommend_comment text,
1166    PRIMARY KEY (table_name, column_name)
1167);
Note: See TracBrowser for help on using the repository browser.