source: branches/comu-ver2/html/install/sql/create_table_pgsql.sql @ 17263

Revision 17263, 27.2 KB checked in by Yammy, 16 years ago (diff)

メーカー検索機能
http://svn.ec-cube.net/open_trac/ticket/273
実装

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