source: branches/version-2/html/install/sql/create_table_pgsql.sql @ 17143

Revision 17143, 26.5 KB checked in by adachi, 16 years ago (diff)

calendar bloc by Yammy (merge r17073, r17076, r17087, r17091)

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