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

Revision 18764, 28.8 KB checked in by tao, 14 years ago (diff)

フッターのコピーライト表記の年自動更新 (#788)

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