source: branches/dev/html/install/sql/create_table_mysql.sql @ 15014

Revision 15014, 22.0 KB checked in by nakanishi, 17 years ago (diff)

【不具合修正】dtb_mailtemplateのテーブル作成分を変更。
template_idにauto_incrementを付加

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