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

Revision 19860, 29.6 KB checked in by nanasess, 13 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    charge numeric,
595    use_point numeric,
596    add_point numeric,
597    birth_point numeric DEFAULT 0,
598    tax numeric,
599    total numeric,
600    payment_total numeric,
601    payment_id int,
602    payment_method text,
603    note text,
604    status smallint,
605    create_date timestamp NOT NULL DEFAULT now(),
606    update_date timestamp NOT NULL,
607    commit_date timestamp,
608    payment_date timestamp,
609    device_type_id int,
610    del_flg smallint NOT NULL DEFAULT 0,
611    memo01 text,
612    memo02 text,
613    memo03 text,
614    memo04 text,
615    memo05 text,
616    memo06 text,
617    memo07 text,
618    memo08 text,
619    memo09 text,
620    memo10 text,
621    PRIMARY KEY (order_id)
622);
623
624CREATE TABLE dtb_order_temp (
625    order_temp_id text NOT NULL,
626    customer_id int NOT NULL,
627    message text,
628    order_name01 text,
629    order_name02 text,
630    order_kana01 text,
631    order_kana02 text,
632    order_email text,
633    order_tel01 text,
634    order_tel02 text,
635    order_tel03 text,
636    order_fax01 text,
637    order_fax02 text,
638    order_fax03 text,
639    order_zip01 text,
640    order_zip02 text,
641    order_pref smallint,
642    order_addr01 text,
643    order_addr02 text,
644    order_sex smallint,
645    order_birth timestamp,
646    order_job int,
647    subtotal numeric,
648    discount numeric,
649    charge numeric,
650    use_point numeric,
651    add_point numeric,
652    birth_point numeric DEFAULT 0,
653    tax numeric,
654    total numeric,
655    payment_total numeric,
656    payment_id int,
657    payment_method text,
658    note text,
659    mail_flag smallint,
660    status smallint,
661    point_check smallint,
662    create_date timestamp NOT NULL DEFAULT now(),
663    update_date timestamp NOT NULL,
664    device_type_id int,
665    del_flg smallint NOT NULL DEFAULT 0,
666    order_id int,
667    memo01 text,
668    memo02 text,
669    memo03 text,
670    memo04 text,
671    memo05 text,
672    memo06 text,
673    memo07 text,
674    memo08 text,
675    memo09 text,
676    memo10 text,
677    session text
678);
679
680CREATE TABLE dtb_shipping (
681    shipping_id int NOT NULL,
682    order_id int NOT NULL,
683    shipping_name01 text,
684    shipping_name02 text,
685    shipping_kana01 text,
686    shipping_kana02 text,
687    shipping_tel01 text,
688    shipping_tel02 text,
689    shipping_tel03 text,
690    shipping_fax01 text,
691    shipping_fax02 text,
692    shipping_fax03 text,
693    shipping_pref smallint,
694    shipping_zip01 text,
695    shipping_zip02 text,
696    shipping_addr01 text,
697    shipping_addr02 text,
698    deliv_id int NOT NULL,
699    time_id int NOT NULL,
700    shipping_fee NUMERIC,
701    shipping_time TEXT,
702    shipping_num TEXT,
703    shipping_date timestamp,
704    shipping_commit_date timestamp,
705    rank int,
706    create_date timestamp NOT NULL DEFAULT now(),
707    update_date timestamp,
708    del_flg smallint NOT NULL DEFAULT 0,
709    PRIMARY KEY (shipping_id, order_id)
710);
711
712CREATE TABLE dtb_shipment_item (
713    shipping_id int NOT NULL,
714    product_class_id int NOT NULL,
715    order_id int NOT NULL,
716    product_name text NOT NULL,
717    product_code text,
718    classcategory_name1 text,
719    classcategory_name2 text,
720    price numeric,
721    quantity numeric,
722    PRIMARY KEY (shipping_id, product_class_id, order_id)
723);
724
725CREATE TABLE dtb_other_deliv (
726    other_deliv_id int NOT NULL,
727    customer_id int NOT NULL,
728    name01 text,
729    name02 text,
730    kana01 text,
731    kana02 text,
732    zip01 text,
733    zip02 text,
734    pref smallint,
735    addr01 text,
736    addr02 text,
737    tel01 text,
738    tel02 text,
739    tel03 text,
740    PRIMARY KEY (other_deliv_id)
741);
742
743CREATE TABLE dtb_order_detail (
744    order_id int NOT NULL,
745    product_id int NOT NULL,
746    product_class_id int NOT NULL,
747    product_name text NOT NULL,
748    product_code text,
749    classcategory_name1 text,
750    classcategory_name2 text,
751    price numeric,
752    quantity numeric,
753    point_rate numeric
754);
755
756CREATE TABLE dtb_member (
757    member_id int NOT NULL,
758    name text,
759    department text,
760    login_id text NOT NULL,
761    password text NOT NULL,
762    authority smallint NOT NULL,
763    rank int NOT NULL DEFAULT 0,
764    work smallint NOT NULL DEFAULT 1,
765    del_flg smallint NOT NULL DEFAULT 0,
766    creator_id int NOT NULL,
767    create_date timestamp NOT NULL DEFAULT now(),
768    update_date timestamp NOT NULL,
769    login_date timestamp,
770    PRIMARY KEY (member_id)
771);
772
773CREATE TABLE dtb_bat_relate_products (
774    product_id int,
775    relate_product_id int,
776    customer_id int,
777    create_date timestamp NOT NULL DEFAULT now()
778);
779
780CREATE TABLE dtb_pagelayout (
781    device_type_id int NOT NULL,
782    page_id int NOT NULL,
783    page_name text,
784    url text NOT NULL,
785    php_dir text,
786    tpl_dir text,
787    filename text,
788    header_chk smallint DEFAULT 1,
789    footer_chk smallint DEFAULT 1,
790    edit_flg smallint DEFAULT 1,
791    author text,
792    description text,
793    keyword text,
794    update_url text,
795    create_date timestamp NOT NULL DEFAULT now(),
796    update_date timestamp NOT NULL,
797    PRIMARY KEY (device_type_id, page_id)
798);
799
800CREATE TABLE dtb_bloc (
801    device_type_id int NOT NULL,
802    bloc_id int NOT NULL,
803    bloc_name text,
804    tpl_path text,
805    filename text NOT NULL,
806    create_date timestamp NOT NULL DEFAULT now(),
807    update_date timestamp NOT NULL,
808    php_path text,
809    deletable_flg smallint NOT NULL DEFAULT 1,
810    PRIMARY KEY (device_type_id, bloc_id),
811    UNIQUE (device_type_id, filename)
812);
813
814CREATE TABLE dtb_blocposition (
815    device_type_id int NOT NULL,
816    page_id int NOT NULL,
817    target_id int,
818    bloc_id int,
819    bloc_row int,
820    anywhere smallint DEFAULT 0 NOT NULL,
821    PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
822);
823
824CREATE TABLE dtb_csv (
825    no int,
826    csv_id int NOT NULL,
827    col text,
828    disp_name text,
829    rank int,
830    rw_flg smallint DEFAULT 1,
831    status smallint NOT NULL DEFAULT 1,
832    create_date timestamp NOT NULL DEFAULT now(),
833    update_date timestamp NOT NULL,
834    mb_convert_kana_option text,
835    size_const_type text,
836    error_check_types text,
837    PRIMARY KEY (no)
838);
839
840CREATE TABLE dtb_csv_sql (
841    sql_id int,
842    sql_name text NOT NULL,
843    csv_sql text,
844    create_date timestamp NOT NULL DEFAULT now(),
845    update_date timestamp NOT NULL,
846    PRIMARY KEY (sql_id)
847);
848
849CREATE TABLE dtb_templates (
850    template_code text NOT NULL,
851    template_name text,
852    create_date timestamp NOT NULL DEFAULT now(),
853    update_date timestamp NOT NULL,
854    PRIMARY KEY (template_code)
855);
856
857CREATE TABLE dtb_table_comment (
858    id int,
859    table_name text,
860    column_name text,
861    description text,
862    PRIMARY KEY (id)
863);
864
865CREATE TABLE dtb_maker (
866    maker_id int NOT NULL,
867    name text NOT NULL,
868    rank int NOT NULL DEFAULT 0,
869    creator_id int NOT NULL,
870    create_date timestamp NOT NULL DEFAULT now(),
871    update_date timestamp NOT NULL,
872    del_flg smallint NOT NULL DEFAULT 0,
873    PRIMARY KEY (maker_id)
874);
875
876CREATE TABLE dtb_maker_count (
877    maker_id int NOT NULL,
878    product_count int NOT NULL,
879    create_date timestamp NOT NULL DEFAULT now()
880);
881
882CREATE TABLE mtb_pref (
883    id text,
884    name text,
885    rank smallint NOT NULL DEFAULT 0,
886    PRIMARY KEY (id)
887);
888
889CREATE TABLE mtb_permission (
890    id text,
891    name text,
892    rank smallint NOT NULL DEFAULT 0,
893    PRIMARY KEY (id)
894);
895
896CREATE TABLE mtb_disable_logout (
897    id smallint,
898    name text,
899    rank smallint NOT NULL DEFAULT 0,
900    PRIMARY KEY (id)
901);
902
903CREATE TABLE mtb_authority (
904    id smallint,
905    name text,
906    rank smallint NOT NULL DEFAULT 0,
907    PRIMARY KEY (id)
908);
909
910CREATE TABLE mtb_work (
911    id smallint,
912    name text,
913    rank smallint NOT NULL DEFAULT 0,
914    PRIMARY KEY (id)
915);
916
917CREATE TABLE mtb_disp (
918    id smallint,
919    name text,
920    rank smallint NOT NULL DEFAULT 0,
921    PRIMARY KEY (id)
922);
923
924CREATE TABLE mtb_class (
925    id smallint,
926    name text,
927    rank smallint NOT NULL DEFAULT 0,
928    PRIMARY KEY (id)
929);
930
931CREATE TABLE mtb_status (
932    id smallint,
933    name text,
934    rank smallint NOT NULL DEFAULT 0,
935    PRIMARY KEY (id)
936);
937
938CREATE TABLE mtb_status_image (
939    id smallint,
940    name text,
941    rank smallint NOT NULL DEFAULT 0,
942    PRIMARY KEY (id)
943);
944
945CREATE TABLE mtb_allowed_tag (
946    id smallint,
947    name text,
948    rank smallint NOT NULL DEFAULT 0,
949    PRIMARY KEY (id)
950);
951
952CREATE TABLE mtb_page_max (
953    id smallint,
954    name text,
955    rank smallint NOT NULL DEFAULT 0,
956    PRIMARY KEY (id)
957);
958
959CREATE TABLE mtb_magazine_type (
960    id smallint,
961    name text,
962    rank smallint NOT NULL DEFAULT 0,
963    PRIMARY KEY (id)
964);
965
966CREATE TABLE mtb_mail_magazine_type (
967    id smallint,
968    name text,
969    rank smallint NOT NULL DEFAULT 0,
970    PRIMARY KEY (id)
971);
972
973CREATE TABLE mtb_recommend (
974    id smallint,
975    name text,
976    rank smallint NOT NULL DEFAULT 0,
977    PRIMARY KEY (id)
978);
979
980CREATE TABLE mtb_taxrule (
981    id smallint,
982    name text,
983    rank smallint NOT NULL DEFAULT 0,
984    PRIMARY KEY (id)
985);
986
987CREATE TABLE mtb_mail_template (
988    id smallint,
989    name text,
990    rank smallint NOT NULL DEFAULT 0,
991    PRIMARY KEY (id)
992);
993
994CREATE TABLE mtb_mail_tpl_path (
995    id smallint,
996    name text,
997    rank smallint NOT NULL DEFAULT 0,
998    PRIMARY KEY (id)
999);
1000
1001CREATE TABLE mtb_job (
1002    id smallint,
1003    name text,
1004    rank smallint NOT NULL DEFAULT 0,
1005    PRIMARY KEY (id)
1006);
1007
1008CREATE TABLE mtb_reminder (
1009    id smallint,
1010    name text,
1011    rank smallint NOT NULL DEFAULT 0,
1012    PRIMARY KEY (id)
1013);
1014
1015CREATE TABLE mtb_sex (
1016    id smallint,
1017    name text,
1018    rank smallint NOT NULL DEFAULT 0,
1019    PRIMARY KEY (id)
1020);
1021
1022CREATE TABLE mtb_page_rows (
1023    id smallint,
1024    name text,
1025    rank smallint NOT NULL DEFAULT 0,
1026    PRIMARY KEY (id)
1027);
1028
1029CREATE TABLE mtb_mail_type (
1030    id smallint,
1031    name text,
1032    rank smallint NOT NULL DEFAULT 0,
1033    PRIMARY KEY (id)
1034);
1035
1036CREATE TABLE mtb_order_status (
1037    id smallint,
1038    name text,
1039    rank smallint NOT NULL DEFAULT 0,
1040    PRIMARY KEY (id)
1041);
1042
1043CREATE TABLE mtb_product_status_color (
1044    id smallint,
1045    name text,
1046    rank smallint NOT NULL DEFAULT 0,
1047    PRIMARY KEY (id)
1048);
1049
1050CREATE TABLE mtb_order_status_color (
1051    id smallint,
1052    name text,
1053    rank smallint NOT NULL DEFAULT 0,
1054    PRIMARY KEY (id)
1055);
1056
1057CREATE TABLE mtb_wday (
1058    id smallint,
1059    name text,
1060    rank smallint NOT NULL DEFAULT 0,
1061    PRIMARY KEY (id)
1062);
1063
1064CREATE TABLE mtb_delivery_date (
1065    id smallint,
1066    name text,
1067    rank smallint NOT NULL DEFAULT 0,
1068    PRIMARY KEY (id)
1069);
1070
1071CREATE TABLE mtb_product_list_max (
1072    id smallint,
1073    name text,
1074    rank smallint NOT NULL DEFAULT 0,
1075    PRIMARY KEY (id)
1076);
1077
1078CREATE TABLE mtb_convenience (
1079    id smallint,
1080    name text,
1081    rank smallint NOT NULL DEFAULT 0,
1082    PRIMARY KEY (id)
1083);
1084
1085CREATE TABLE mtb_conveni_message (
1086    id smallint,
1087    name text,
1088    rank smallint NOT NULL DEFAULT 0,
1089    PRIMARY KEY (id)
1090);
1091
1092CREATE TABLE mtb_db (
1093    id smallint,
1094    name text,
1095    rank smallint NOT NULL DEFAULT 0,
1096    PRIMARY KEY (id)
1097);
1098
1099CREATE TABLE mtb_target (
1100    id smallint,
1101    name text,
1102    rank smallint NOT NULL DEFAULT 0,
1103    PRIMARY KEY (id)
1104);
1105
1106CREATE TABLE mtb_review_deny_url (
1107    id smallint,
1108    name text,
1109    rank smallint NOT NULL DEFAULT 0,
1110    PRIMARY KEY (id)
1111);
1112
1113CREATE TABLE mtb_track_back_status (
1114    id smallint,
1115    name text,
1116    rank smallint NOT NULL DEFAULT 0,
1117    PRIMARY KEY (id)
1118);
1119
1120CREATE TABLE mtb_site_control_track_back (
1121    id smallint,
1122    name text,
1123    rank smallint NOT NULL DEFAULT 0,
1124    PRIMARY KEY (id)
1125);
1126
1127CREATE TABLE mtb_site_control_affiliate (
1128    id smallint,
1129    name text,
1130    rank smallint NOT NULL DEFAULT 0,
1131    PRIMARY KEY (id)
1132);
1133
1134CREATE TABLE mtb_mobile_domain (
1135    id smallint,
1136    name text,
1137    rank smallint NOT NULL DEFAULT 0,
1138    PRIMARY KEY (id)
1139);
1140
1141CREATE TABLE mtb_ownersstore_err (
1142    id text,
1143    name text,
1144    rank smallint NOT NULL DEFAULT 0,
1145    PRIMARY KEY (id)
1146);
1147
1148CREATE TABLE mtb_ownersstore_ips (
1149    id text,
1150    name text,
1151    rank smallint NOT NULL DEFAULT 0,
1152    PRIMARY KEY (id)
1153);
1154
1155CREATE TABLE mtb_constants (
1156    id text,
1157    name text,
1158    rank smallint NOT NULL DEFAULT 0,
1159    remarks text,
1160    PRIMARY KEY (id)
1161);
1162
1163CREATE TABLE mtb_product_type (
1164    id smallint,
1165    name text,
1166    rank smallint NOT NULL,
1167    PRIMARY KEY (id)
1168);
1169
1170CREATE TABLE mtb_device_type (
1171    id smallint,
1172    name text,
1173    rank smallint NOT NULL,
1174    PRIMARY KEY (id)
1175);
1176
1177CREATE TABLE dtb_mobile_ext_session_id (
1178    session_id text NOT NULL,
1179    param_key text,
1180    param_value text,
1181    url text,
1182    create_date timestamp NOT NULL DEFAULT now()
1183);
1184
1185CREATE TABLE dtb_mobile_kara_mail (
1186    kara_mail_id int PRIMARY KEY,
1187    session_id text NOT NULL,
1188    token text NOT NULL,
1189    next_url text NOT NULL,
1190    create_date timestamp NOT NULL DEFAULT now(),
1191    email text,
1192    receive_date timestamp
1193);
1194
1195CREATE TABLE dtb_module (
1196    module_id int NOT NULL UNIQUE,
1197    module_code text NOT NULL,
1198    module_name text NOT NULL,
1199    sub_data text,
1200    auto_update_flg smallint NOT NULL DEFAULT 0,
1201    del_flg smallint NOT NULL DEFAULT 0,
1202    create_date timestamp NOT NULL DEFAULT now(),
1203    update_date timestamp NOT NULL
1204);
1205
1206CREATE TABLE dtb_session (
1207    sess_id text NOT NULL,
1208    sess_data text,
1209    create_date timestamp NOT NULL DEFAULT now(),
1210    update_date timestamp NOT NULL,
1211    PRIMARY KEY (sess_id)
1212);
1213
1214CREATE TABLE dtb_site_control (
1215    control_id int NOT NULL,
1216    control_title text,
1217    control_text text,
1218    control_flg smallint NOT NULL DEFAULT 2,
1219    del_flg smallint NOT NULL DEFAULT 0,
1220    memo text,
1221    create_date timestamp NOT NULL DEFAULT now(),
1222    update_date timestamp NOT NULL,
1223    PRIMARY KEY (control_id)
1224);
1225
1226CREATE TABLE dtb_trackback (
1227    trackback_id int NOT NULL,
1228    product_id int NOT NULL,
1229    blog_name text NOT NULL,
1230    title text NOT NULL,
1231    excerpt text NOT NULL,
1232    url text NOT NULL,
1233    status smallint NOT NULL DEFAULT 2,
1234    del_flg smallint NOT NULL DEFAULT 0,
1235    create_date timestamp NOT NULL DEFAULT now(),
1236    update_date timestamp NOT NULL,
1237    PRIMARY KEY (trackback_id)
1238);
1239
1240CREATE TABLE dtb_bkup (
1241    bkup_name   text,
1242    bkup_memo   text,
1243    create_date timestamp NOT NULL DEFAULT now(),
1244    PRIMARY KEY (bkup_name)
1245);
1246
1247CREATE TABLE dtb_plugin (
1248    plugin_id int NOT NULL,
1249    plugin_name text NOT NULL,
1250    enable smallint NOT NULL DEFAULT 0,
1251    del_flg smallint NOT NULL DEFAULT 0,
1252    class_name text NOT NULL,
1253    create_date timestamp NOT NULL DEFAULT now(),
1254    update_date timestamp NOT NULL,
1255    PRIMARY KEY (plugin_id)
1256);
1257
1258CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id);
1259CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
1260CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
1261CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id);
1262
1263CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key);
1264CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value);
1265CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url);
1266CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
1267
1268CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token);
1269CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
1270CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
1271
1272CREATE TABLE dtb_index_list (
1273    table_name text NOT NULL DEFAULT '',
1274    column_name text NOT NULL DEFAULT '',
1275    recommend_flg smallint NOT NULL DEFAULT 0,
1276    recommend_comment text,
1277    PRIMARY KEY (table_name, column_name)
1278);
Note: See TracBrowser for help on using the repository browser.