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

Revision 19928, 29.6 KB checked in by nanasess, 11 years ago (diff)

#843(複数配送先の指定)

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