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

Revision 17767, 26.6 KB checked in by zeniya, 15 years ago (diff)

EC-CUBE2.4改修 #298

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