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

Revision 18514, 28.7 KB checked in by Seasoft, 11 years ago (diff)

#578(都道府県ID 都道府県マスタと受注で型が異なる)を改修

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