source: temp/trunk/html/install/sql/create_table_pgsql.sql @ 7553

Revision 7553, 20.3 KB checked in by kakinaka, 20 years ago (diff)

blank

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