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

Revision 16664, 25.8 KB checked in by adachi, 16 years ago (diff)

マスターデータ追加

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