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

Revision 21643, 27.0 KB checked in by Seasoft, 12 years ago (diff)

#1703 (値引きの入力状況がフロント機能と管理機能で相違している)

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