source: branches/dev/html/install/sql/create_table_pgsql.sql @ 14614

Revision 14614, 21.1 KB checked in by adati, 19 years ago (diff)

dtb_mailtemplateにbodyカラムを追加

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    body   text,
184    creator_id int4 NOT NULL,
185    del_flg int2 NOT NULL DEFAULT 0,
186    create_date timestamp NOT NULL DEFAULT now(),
187    update_date timestamp NOT NULL
188);
189
190CREATE TABLE dtb_mailmaga_template (
191    template_id serial NOT NULL UNIQUE,
192    subject text,
193    charge_image text,
194    mail_method int4,
195    header text,
196    body text,
197    main_title text,
198    main_comment text,
199    main_product_id int4,
200    sub_title text,
201    sub_comment text,
202    sub_product_id01 int4,
203    sub_product_id02 int4,
204    sub_product_id03 int4,
205    sub_product_id04 int4,
206    sub_product_id05 int4,
207    sub_product_id06 int4,
208    sub_product_id07 int4,
209    sub_product_id08 int4,
210    sub_product_id09 int4,
211    sub_product_id10 int4,
212    sub_product_id11 int4,
213    sub_product_id12 int4,
214    del_flg int2 NOT NULL DEFAULT 0,
215    creator_id int4 NOT NULL,
216    create_date timestamp NOT NULL DEFAULT now(),
217    update_date timestamp
218);
219
220CREATE TABLE dtb_send_history (
221    send_id serial NOT NULL,
222    mail_method int2,
223    subject text,
224    body text,
225    send_count int4,
226    complete_count int4 NOT NULL DEFAULT 0,
227    start_date timestamp,
228    end_date timestamp,
229    search_data text,
230    del_flg int2 NOT NULL DEFAULT 0,
231    creator_id int4 NOT NULL,
232    create_date timestamp NOT NULL DEFAULT now(),
233    update_date timestamp NOT NULL DEFAULT now()
234);
235
236CREATE TABLE dtb_send_customer (
237    customer_id int4,
238    send_id serial NOT NULL,
239    email text,
240    name text,
241    send_flag int2
242);
243
244CREATE TABLE dtb_products (
245    product_id serial NOT NULL UNIQUE,
246    name text,
247    deliv_fee numeric,
248    sale_limit numeric,
249    sale_unlimited int2 DEFAULT 0,
250    category_id int4,
251    rank int4,
252    status int2 NOT NULL DEFAULT 2,
253    product_flag text,
254    point_rate numeric,
255    comment1 text,
256    comment2 text,
257    comment3 text,
258    comment4 text,
259    comment5 text,
260    comment6 text,
261    file1 text,
262    file2 text,
263    file3 text,
264    file4 text,
265    file5 text,
266    file6 text,
267    main_list_comment text,
268    main_list_image text,
269    main_comment text,
270    main_image text,
271    main_large_image text,
272    sub_title1 text,
273    sub_comment1 text,
274    sub_image1 text,
275    sub_large_image1 text,
276    sub_title2 text,
277    sub_comment2 text,
278    sub_image2 text,
279    sub_large_image2 text,
280    sub_title3 text,
281    sub_comment3 text,
282    sub_image3 text,
283    sub_large_image3 text,
284    sub_title4 text,
285    sub_comment4 text,
286    sub_image4 text,
287    sub_large_image4 text,
288    sub_title5 text,
289    sub_comment5 text,
290    sub_image5 text,
291    sub_large_image5 text,
292    sub_title6 text,
293    sub_comment6 text,
294    sub_image6 text,
295    sub_large_image6 text,
296    del_flg int2 NOT NULL DEFAULT 0,
297    creator_id int4 NOT NULL,
298    create_date timestamp NOT NULL DEFAULT now(),
299    update_date timestamp,
300    deliv_date_id int4
301);
302
303CREATE TABLE dtb_products_class (
304    product_class_id serial NOT NULL UNIQUE,
305    product_id int4 NOT NULL,
306    classcategory_id1 int4 NOT NULL DEFAULT 0,
307    classcategory_id2 int4 NOT NULL DEFAULT 0,
308    product_code text,
309    stock numeric,
310    stock_unlimited int2 DEFAULT 0,
311    sale_limit numeric,
312    price01 numeric,
313    price02 numeric,
314    status int2,
315    creator_id int4 NOT NULL,
316    create_date timestamp NOT NULL DEFAULT now(),
317    update_date timestamp
318);
319
320CREATE TABLE dtb_class (
321    class_id serial NOT NULL,
322    name text,
323    status int2,
324    rank int4,
325    creator_id int4 NOT NULL,
326    create_date timestamp NOT NULL DEFAULT now(),
327    update_date timestamp,
328    del_flg  int2 NOT NULL DEFAULT 0,
329    product_id int4
330);
331
332CREATE TABLE dtb_classcategory (
333    classcategory_id serial NOT NULL,
334    name text,
335    class_id int4 NOT NULL,
336    status int2,
337    rank int4,
338    creator_id int4 NOT NULL,
339    create_date timestamp NOT NULL DEFAULT now(),
340    update_date timestamp,
341    del_flg  int2 NOT NULL DEFAULT 0
342);
343
344CREATE TABLE dtb_category (
345    category_id serial NOT NULL,
346    category_name text,
347    parent_category_id int4 NOT NULL DEFAULT 0,
348    level int4 NOT NULL,
349    rank int4,
350    creator_id int4 NOT NULL,
351    create_date timestamp NOT NULL DEFAULT now(),
352    update_date timestamp,
353    del_flg  int2 NOT NULL DEFAULT 0
354);
355
356CREATE TABLE dtb_bat_order_daily (
357    total_order numeric NOT NULL DEFAULT 0,
358    member numeric NOT NULL DEFAULT 0,
359    nonmember numeric NOT NULL DEFAULT 0,
360    men numeric NOT NULL DEFAULT 0,
361    women numeric NOT NULL DEFAULT 0,
362    men_member numeric NOT NULL DEFAULT 0,
363    men_nonmember numeric NOT NULL DEFAULT 0,
364    women_member numeric NOT NULL DEFAULT 0,
365    women_nonmember numeric NOT NULL DEFAULT 0,
366    total numeric NOT NULL DEFAULT 0,
367    total_average numeric NOT NULL DEFAULT 0,
368    order_date timestamp NOT NULL DEFAULT now(),
369    create_date timestamp NOT NULL DEFAULT now(),
370    year int2 NOT NULL,
371    month int2 NOT NULL,
372    day int2 NOT NULL,
373    wday int2 NOT NULL,
374    key_day text NOT NULL,
375    key_month text NOT NULL,
376    key_year text NOT NULL,
377    key_wday text NOT NULL
378);
379
380CREATE TABLE dtb_bat_order_daily_hour (
381    total_order numeric NOT NULL DEFAULT 0,
382    member numeric NOT NULL DEFAULT 0,
383    nonmember numeric NOT NULL DEFAULT 0,
384    men numeric NOT NULL DEFAULT 0,
385    women numeric NOT NULL DEFAULT 0,
386    men_member numeric NOT NULL DEFAULT 0,
387    men_nonmember numeric NOT NULL DEFAULT 0,
388    women_member numeric NOT NULL DEFAULT 0,
389    women_nonmember numeric NOT NULL DEFAULT 0,
390    total numeric NOT NULL DEFAULT 0,
391    total_average numeric NOT NULL DEFAULT 0,
392    hour int2 NOT NULL DEFAULT 0,
393    order_date timestamp DEFAULT now(),
394    create_date timestamp NOT NULL DEFAULT now()
395);
396
397CREATE TABLE dtb_recommend_products (
398    product_id int4 NOT NULL,
399    recommend_product_id serial NOT NULL,
400    rank int4 NOT NULL,
401    comment text,
402    status int2 NOT NULL DEFAULT 0,
403    creator_id int4 NOT NULL,
404    create_date timestamp NOT NULL DEFAULT now(),
405    update_date timestamp NOT NULL DEFAULT now()
406);
407
408CREATE TABLE dtb_review (
409    review_id serial NOT NULL,
410    product_id int4 NOT NULL,
411    reviewer_name text NOT NULL,
412    reviewer_url text,
413    sex int2,
414    customer_id int4,
415    recommend_level int2 NOT NULL,
416    title text NOT NULL,
417    comment text NOT NULL,
418    status int2 DEFAULT 2,
419    creator_id int4 NOT NULL,
420    create_date timestamp NOT NULL DEFAULT now(),
421    update_date timestamp,
422    del_flg  int2 NOT NULL DEFAULT 0
423);
424
425CREATE TABLE dtb_customer_reading (
426    reading_product_id int4 NOT NULL,
427    customer_id int4 NOT NULL,
428    create_date timestamp NOT NULL,
429    update_date timestamp NOT NULL DEFAULT NOW()
430);
431
432CREATE TABLE dtb_category_count (
433    category_id int4 NOT NULL,
434    product_count int4 NOT NULL,
435    create_date timestamp NOT NULL DEFAULT Now()
436);
437
438CREATE TABLE dtb_category_total_count (
439    category_id int4 NOT NULL,
440    product_count int4,
441    create_date timestamp NOT NULL DEFAULT Now()
442);
443
444CREATE TABLE dtb_news (
445    news_id serial NOT NULL UNIQUE,
446    news_date timestamp,
447    rank int4,
448    news_title text NOT NULL,
449    news_comment text,
450    news_url text,
451    news_select int2 NOT NULL DEFAULT 0,
452    link_method text,
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_best_products (
460    best_id serial NOT NULL,
461    category_id int4 NOT NULL,
462    rank int4 NOT NULL DEFAULT 0,
463    product_id int4 NOT NULL,
464    title text,
465    comment text,
466    creator_id int4 NOT NULL,
467    create_date timestamp NOT NULL DEFAULT now(),
468    update_date timestamp,
469    del_flg  int2 NOT NULL DEFAULT 0
470);
471
472CREATE TABLE dtb_mail_history (
473    send_id serial  NOT NULL,
474    order_id int4 NOT NULL,
475    send_date timestamp,
476    template_id int4,
477    creator_id int4 NOT NULL,
478    subject text,
479    mail_body text
480);
481
482CREATE TABLE dtb_customer (
483    customer_id serial  NOT NULL,
484    name01 text NOT NULL,
485    name02 text NOT NULL,
486    kana01 text NOT NULL,
487    kana02 text NOT NULL,
488    zip01 text,
489    zip02 text,
490    pref int2,
491    addr01 text,
492    addr02 text,
493    email text NOT NULL,
494    email_mobile text,
495    tel01 text,
496    tel02 text,
497    tel03 text,
498    fax01 text,
499    fax02 text,
500    fax03 text,
501    sex int2,
502    job int2,
503    birth timestamp,
504    password text,
505    reminder int2,
506    reminder_answer text,
507    secret_key text NOT NULL UNIQUE,
508    first_buy_date timestamp,
509    last_buy_date timestamp,
510    buy_times numeric DEFAULT 0,
511    buy_total numeric DEFAULT 0,
512    point numeric DEFAULT 0,
513    note text,
514    status int2 NOT NULL DEFAULT 1,
515    create_date timestamp NOT NULL DEFAULT now(),
516    update_date timestamp DEFAULT now(),
517    del_flg  int2 NOT NULL DEFAULT 0,
518    cell01 text,
519    cell02 text,
520    cell03 text,
521    mobile_phone_id text,
522    mailmaga_flg int2
523);
524
525CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id);
526
527CREATE TABLE dtb_customer_mail_temp (
528    email text NOT NULL UNIQUE,
529    mail_flag int2,
530    temp_id text NOT NULL UNIQUE,
531    end_flag int2,
532    update_date timestamp NOT NULL DEFAULT Now(),
533    create_data timestamp NOT NULL DEFAULT Now()
534);
535
536CREATE TABLE dtb_order (
537    order_id serial NOT NULL,
538    order_temp_id text,
539    customer_id int4 NOT NULL,
540    message text,
541    order_name01 text,
542    order_name02 text,
543    order_kana01 text,
544    order_kana02 text,
545    order_email text,
546    order_tel01 text,
547    order_tel02 text,
548    order_tel03 text,
549    order_fax01 text,
550    order_fax02 text,
551    order_fax03 text,
552    order_zip01 text,
553    order_zip02 text,
554    order_pref text,
555    order_addr01 text,
556    order_addr02 text,
557    order_sex int2,
558    order_birth timestamp,
559    order_job int4,
560    deliv_name01 text,
561    deliv_name02 text,
562    deliv_kana01 text,
563    deliv_kana02 text,
564    deliv_tel01 text,
565    deliv_tel02 text,
566    deliv_tel03 text,
567    deliv_fax01 text,
568    deliv_fax02 text,
569    deliv_fax03 text,
570    deliv_zip01 text,
571    deliv_zip02 text,
572    deliv_pref text,
573    deliv_addr01 text,
574    deliv_addr02 text,
575    subtotal numeric,
576    discount numeric,
577    deliv_fee numeric,
578    charge numeric,
579    use_point numeric,
580    add_point numeric,
581    birth_point numeric DEFAULT 0,
582    tax numeric,
583    total numeric,
584    payment_total numeric,
585    payment_id int4,
586    payment_method text,
587    deliv_id int4,
588    deliv_time_id int4,
589    deliv_time text,
590    deliv_no text,
591    note text,
592    status int2,
593    create_date timestamp NOT NULL DEFAULT now(),
594    loan_result text,
595    credit_result text,
596    credit_msg text,
597    update_date timestamp,
598    commit_date timestamp,
599    del_flg  int2 NOT NULL DEFAULT 0,
600    deliv_date text,
601    conveni_data text,
602    cell01 text,
603    cell02 text,
604    cell03 text,
605    memo01 text,
606    memo02 text,
607    memo03 text,
608    memo04 text,
609    memo05 text,
610    memo06 text,
611    memo07 text,
612    memo08 text,
613    memo09 text,
614    memo10 text,
615    campaign_id int4
616);
617
618CREATE TABLE dtb_order_temp (
619    order_temp_id text NOT NULL,
620    customer_id int4 NOT NULL,
621    message text,
622    order_name01 text,
623    order_name02 text,
624    order_kana01 text,
625    order_kana02 text,
626    order_email text,
627    order_tel01 text,
628    order_tel02 text,
629    order_tel03 text,
630    order_fax01 text,
631    order_fax02 text,
632    order_fax03 text,
633    order_zip01 text,
634    order_zip02 text,
635    order_pref text,
636    order_addr01 text,
637    order_addr02 text,
638    order_sex int2,
639    order_birth timestamp,
640    order_job int4,
641    deliv_name01 text,
642    deliv_name02 text,
643    deliv_kana01 text,
644    deliv_kana02 text,
645    deliv_tel01 text,
646    deliv_tel02 text,
647    deliv_tel03 text,
648    deliv_fax01 text,
649    deliv_fax02 text,
650    deliv_fax03 text,
651    deliv_zip01 text,
652    deliv_zip02 text,
653    deliv_pref text,
654    deliv_addr01 text,
655    deliv_addr02 text,
656    subtotal numeric,
657    discount numeric,
658    deliv_fee numeric,
659    charge numeric,
660    use_point numeric,
661    add_point numeric,
662    birth_point numeric DEFAULT 0,
663    tax numeric,
664    total numeric,
665    payment_total numeric,
666    payment_id int4,
667    payment_method text,
668    deliv_id int4,
669    deliv_time_id int4,
670    deliv_time text,
671    deliv_no text,
672    note text,
673    mail_flag int2,
674    status int2,
675    deliv_check int2,
676    point_check int2,
677    loan_result text,
678    credit_result text,
679    credit_msg text,
680    create_date timestamp NOT NULL DEFAULT now(),
681    update_date timestamp,
682    del_flg  int2 NOT NULL DEFAULT 0,
683    deliv_date text,
684    conveni_data text,
685    cell01 text,
686    cell02 text,
687    cell03 text,
688    order_id int4,
689    memo01 text,
690    memo02 text,
691    memo03 text,
692    memo04 text,
693    memo05 text,
694    memo06 text,
695    memo07 text,
696    memo08 text,
697    memo09 text,
698    memo10 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);
737
738CREATE TABLE dtb_member (
739    member_id serial NOT NULL,
740    name text,
741    department text,
742    login_id text NOT NULL,
743    password text NOT NULL,
744    authority int2 NOT NULL,
745    rank int4 NOT NULL DEFAULT 0,
746    work int2 NOT NULL DEFAULT 1,
747    del_flg int2 NOT NULL DEFAULT 0,
748    creator_id int4 NOT NULL,
749    update_date timestamp,
750    create_date timestamp NOT NULL DEFAULT now(),
751    login_date timestamp
752);
753
754CREATE TABLE dtb_question (
755    question_id serial NOT NULL,
756    question_name text,
757    question text,
758    create_date timestamp NOT NULL DEFAULT now(),
759    del_flg  int2 NOT NULL DEFAULT 0
760);
761
762CREATE TABLE dtb_question_result (
763    result_id serial NOT NULL,
764    question_id int4 NOT NULL,
765    question_date timestamp,
766    question_name text,
767    name01 text,
768    name02 text,
769    kana01 text,
770    kana02 text,
771    zip01 text,
772    zip02 text,
773    pref int2,
774    addr01 text,
775    addr02 text,
776    tel01 text,
777    tel02 text,
778    tel03 text,
779    mail01 text,
780    question01 text,
781    question02 text,
782    question03 text,
783    question04 text,
784    question05 text,
785    question06 text,
786    create_date timestamp NOT NULL DEFAULT now(),
787    del_flg  int2 NOT NULL DEFAULT 0
788);
789
790CREATE TABLE dtb_bat_relate_products (
791    product_id int4,
792    relate_product_id int4,
793    customer_id int4,
794    create_date timestamp DEFAULT now()
795);
796
797CREATE TABLE dtb_campaign (
798    campaign_id serial NOT NULL,
799    campaign_name text,
800    campaign_point_rate numeric NOT NULL,
801    campaign_point_type int2,
802    start_date timestamp NOT NULL,
803    end_date timestamp NOT NULL,
804    directory_name text NOT NULL,
805    limit_count int4 NOT NULL DEFAULT 0,
806    total_count int4 NOT NULL DEFAULT 0,
807    orverlapping_flg int2 NOT NULL DEFAULT 0,
808    cart_flg int2 NOT NULL DEFAULT 0,
809    deliv_free_flg int2 NOT NULL DEFAULT 0,
810    search_condition text,
811    del_flg int2 NOT NULL DEFAULT 0,
812    create_date timestamp NOT NULL,
813    update_date timestamp NOT NULL DEFAULT now()
814);
815
816CREATE TABLE dtb_campaign_detail (
817    campaign_id int4 NOT NULL,
818    product_id int4 NOT NULL,
819    campaign_point_rate numeric NOT NULL
820);
821
822CREATE TABLE dtb_pagelayout (
823    page_id serial NOT NULL,
824    page_name text,
825    url text NOT NULL,
826    php_dir text,
827    tpl_dir text,
828    filename text,
829    header_chk int2 DEFAULT 1,
830    footer_chk int2 DEFAULT 1,
831    edit_flg int2 DEFAULT 1,
832    author text,
833    description text,
834    keyword text,
835    update_url text,
836    create_date timestamp NOT NULL DEFAULT now(),
837    update_date timestamp NOT NULL DEFAULT now()
838);
839
840CREATE TABLE dtb_bloc (
841    bloc_id serial NOT NULL,
842    bloc_name text,
843    tpl_path text,
844    filename text NOT NULL UNIQUE,
845    create_date timestamp NOT NULL DEFAULT now(),
846    update_date timestamp NOT NULL DEFAULT now(),
847    php_path text,
848    del_flg int2 NOT NULL DEFAULT 0
849);
850
851CREATE TABLE dtb_blocposition (
852    page_id int4 NOT NULL,
853    target_id int4,
854    bloc_id int4,
855    bloc_row int4,
856    filename text
857);
858
859CREATE TABLE dtb_csv (
860    no serial,
861    csv_id int4 NOT NULL,
862    col text,
863    disp_name text,
864    rank int4,
865    status int2 NOT NULL DEFAULT 1,
866    create_date timestamp NOT NULL DEFAULT now(),
867    update_date timestamp NOT NULL DEFAULT now()
868);
869
870CREATE TABLE dtb_csv_sql (
871    sql_id serial,
872    sql_name text NOT NULL,
873    csv_sql text,
874    update_date timestamp NOT NULL DEFAULT now(),
875    create_date timestamp NOT NULL DEFAULT now()
876);
877
878CREATE TABLE dtb_user_regist (
879    user_id serial NOT NULL,
880    org_name text,
881    post_name text,
882    name01 text,
883    name02 text,
884    kana01 text,
885    kana02 text,
886    email text NOT NULL,
887    url text,
888    note text,
889    secret_key text NOT NULL UNIQUE,
890    status int2 NOT NULL,
891    del_flg int2 DEFAULT 0,
892    create_date timestamp NOT NULL,
893    update_date timestamp NOT NULL DEFAULT now()
894);
895
896create table dtb_templates
897(
898template_code        text        NOT NULL UNIQUE    ,
899template_name        text            ,
900create_date        timestamp        NOT NULL    default now(),
901update_date        timestamp        NOT NULL    default now()
902);
903
904create table dtb_table_comment
905(
906id    serial,
907table_name    text,
908column_name    text,
909description    text
910);
911
Note: See TracBrowser for help on using the repository browser.