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

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