source: branches/feature-module-update/html/install/sql/create_table_pgsql.sql @ 16306

Revision 16306, 25.5 KB checked in by naka, 16 years ago (diff)

モバイルメールドメイン管理テーブル追加

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