source: temp/trunk/html/install/create_table.sql @ 5030

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