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

Revision 20439, 26.6 KB checked in by nanasess, 11 years ago (diff)

#793 (非推奨機能の削除)

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