- Timestamp:
- 2009/10/15 23:53:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/html/install/sql/create_table_mysql.sql
r18275 r18331 1 1 create table dtb_module_update_logs( 2 log_id int auto_increment primary keyNOT NULL,3 module_id int not null,2 log_id int auto_increment NOT NULL, 3 module_id int NOT NULL, 4 4 buckup_path text, 5 5 error_flg smallint DEFAULT 0, … … 7 7 ok text, 8 8 create_date datetime NOT NULL, 9 update_date datetime NOT NULL 10 ) TYPE=InnoDB ; 9 update_date datetime NOT NULL, 10 PRIMARY KEY (log_id) 11 ) TYPE=InnoDB; 11 12 12 13 CREATE TABLE dtb_ownersstore_settings ( 13 14 public_key text 14 ) TYPE=InnoDB 15 ) TYPE=InnoDB; 15 16 16 17 CREATE TABLE dtb_kiyaku ( 17 kiyaku_id int auto_increment primary keyNOT NULL,18 kiyaku_id int auto_increment NOT NULL, 18 19 kiyaku_title text NOT NULL, 19 20 kiyaku_text text NOT NULL, 20 21 rank int NOT NULL DEFAULT 0, 21 22 creator_id int NOT NULL, 22 create_date datetime NOT NULL 23 create_date datetime NOT NULL, 23 24 update_date datetime NOT NULL, 24 del_flg smallint NOT NULL DEFAULT 0 25 ) TYPE=InnoDB ; 25 del_flg smallint NOT NULL DEFAULT 0, 26 PRIMARY KEY (kiyaku_id) 27 ) TYPE=InnoDB; 26 28 27 29 CREATE TABLE dtb_holiday ( 28 holiday_id int auto_increment primary keyNOT NULL,30 holiday_id int auto_increment NOT NULL, 29 31 title text NOT NULL, 30 32 month smallint NOT NULL, … … 34 36 create_date datetime NOT NULL, 35 37 update_date datetime NOT NULL, 36 del_flg smallint NOT NULL DEFAULT 0 37 ) TYPE=InnoDB ; 38 del_flg smallint NOT NULL DEFAULT 0, 39 PRIMARY KEY (holiday_id) 40 ) TYPE=InnoDB; 38 41 39 42 CREATE TABLE mtb_zip ( … … 53 56 flg5 text, 54 57 flg6 text 55 ) TYPE=InnoDB 58 ) TYPE=InnoDB; 56 59 57 60 CREATE TABLE dtb_bat_order_daily_age ( … … 64 67 order_date datetime, 65 68 create_date datetime NOT NULL 66 ) TYPE=InnoDB 69 ) TYPE=InnoDB; 67 70 68 71 CREATE TABLE dtb_update ( … … 78 81 other_files text, 79 82 del_flg smallint NOT NULL DEFAULT 0, 80 create_date datetime NOT NULL 83 create_date datetime NOT NULL, 81 84 update_date datetime, 82 85 release_date datetime NOT NULL, 83 86 PRIMARY KEY (module_id) 84 ) TYPE=InnoDB 87 ) TYPE=InnoDB; 85 88 86 89 CREATE TABLE dtb_baseinfo ( … … 144 147 message text, 145 148 regular_holiday_ids text 146 ) TYPE=InnoDB 149 ) TYPE=InnoDB; 147 150 148 151 CREATE TABLE dtb_deliv ( 149 deliv_id int auto_increment primary keyNOT NULL,152 deliv_id int auto_increment NOT NULL, 150 153 name text, 151 154 service_name text, … … 155 158 del_flg smallint NOT NULL DEFAULT 0, 156 159 creator_id int NOT NULL, 157 create_date datetime NOT NULL , 158 update_date datetime 159 ) TYPE=InnoDB ; 160 create_date datetime NOT NULL, 161 update_date datetime, 162 PRIMARY KEY (deliv_id) 163 ) TYPE=InnoDB; 160 164 161 165 CREATE TABLE dtb_delivtime ( … … 164 168 deliv_time text NOT NULL, 165 169 PRIMARY KEY (deliv_id, time_id) 166 ) TYPE=InnoDB 170 ) TYPE=InnoDB; 167 171 168 172 CREATE TABLE dtb_delivfee ( 169 173 deliv_id int NOT NULL, 170 fee_id int auto_increment primary keyNOT NULL,174 fee_id int auto_increment NOT NULL, 171 175 fee text NOT NULL, 172 pref smallint 173 ) TYPE=InnoDB ; 176 pref smallint, 177 PRIMARY KEY (fee_id) 178 ) TYPE=InnoDB; 174 179 175 180 CREATE TABLE dtb_payment ( 176 payment_id int auto_increment primary keyNOT NULL,181 payment_id int auto_increment NOT NULL, 177 182 payment_method text, 178 183 charge numeric, … … 185 190 del_flg smallint NOT NULL DEFAULT 0, 186 191 creator_id int NOT NULL, 187 create_date datetime NOT NULL 192 create_date datetime NOT NULL, 188 193 update_date datetime, 189 194 payment_image text, 190 195 upper_rule numeric, 191 charge_flg int2DEFAULT 1,196 charge_flg smallint DEFAULT 1, 192 197 rule_min numeric, 193 198 upper_rule_max numeric, 194 module_id int 4,199 module_id int, 195 200 module_path text, 196 201 memo01 text, … … 203 208 memo08 text, 204 209 memo09 text, 205 memo10 text 206 ) TYPE=InnoDB ; 210 memo10 text, 211 PRIMARY KEY (payment_id) 212 ) TYPE=InnoDB; 207 213 208 214 CREATE TABLE dtb_mailtemplate ( … … 213 219 creator_id int NOT NULL, 214 220 del_flg smallint NOT NULL DEFAULT 0, 215 create_date datetime NOT NULL 221 create_date datetime NOT NULL, 216 222 update_date datetime NOT NULL 217 ) TYPE=InnoDB 223 ) TYPE=InnoDB; 218 224 219 225 CREATE TABLE dtb_mailmaga_template ( 220 template_id int auto_increment primary keyNOT NULL,226 template_id int auto_increment NOT NULL, 221 227 subject text, 222 228 charge_image text, … … 243 249 del_flg smallint NOT NULL DEFAULT 0, 244 250 creator_id int NOT NULL, 245 create_date datetime NOT NULL , 246 update_date datetime 247 ) TYPE=InnoDB ; 251 create_date datetime NOT NULL, 252 update_date datetime, 253 PRIMARY KEY (template_id) 254 ) TYPE=InnoDB; 248 255 249 256 CREATE TABLE dtb_send_history ( 250 send_id int auto_increment primary keyNOT NULL,257 send_id int auto_increment NOT NULL, 251 258 mail_method smallint, 252 259 subject text, … … 259 266 del_flg smallint NOT NULL DEFAULT 0, 260 267 creator_id int NOT NULL, 261 create_date datetime NOT NULL , 262 update_date datetime NOT NULL 263 ) TYPE=InnoDB ; 268 create_date datetime NOT NULL, 269 update_date datetime NOT NULL, 270 PRIMARY KEY (send_id) 271 ) TYPE=InnoDB; 264 272 265 273 CREATE TABLE dtb_send_customer ( … … 269 277 name text, 270 278 send_flag smallint 271 ) TYPE=InnoDB 279 ) TYPE=InnoDB; 272 280 273 281 CREATE TABLE dtb_products ( 274 product_id int auto_increment primary keyNOT NULL,282 product_id int auto_increment NOT NULL, 275 283 name text, 276 284 deliv_fee numeric, … … 326 334 del_flg smallint NOT NULL DEFAULT 0, 327 335 creator_id int NOT NULL, 328 create_date datetime NOT NULL , 329 update_date datetime, 330 deliv_date_id int 331 ) TYPE=InnoDB ; 336 create_date datetime NOT NULL, 337 update_date datetime, 338 deliv_date_id int, 339 PRIMARY KEY (product_id) 340 ) TYPE=InnoDB; 332 341 333 342 CREATE TABLE dtb_products_class ( 334 product_class_id int auto_increment primary keyNOT NULL,343 product_class_id int auto_increment NOT NULL, 335 344 product_id int NOT NULL, 336 345 classcategory_id1 int NOT NULL DEFAULT 0, … … 344 353 status smallint, 345 354 creator_id int NOT NULL, 346 create_date datetime NOT NULL , 347 update_date datetime 348 ) TYPE=InnoDB ; 355 create_date datetime NOT NULL, 356 update_date datetime, 357 PRIMARY KEY (product_class_id) 358 ) TYPE=InnoDB; 349 359 350 360 CREATE TABLE dtb_class ( 351 class_id int auto_increment primary keyNOT NULL,361 class_id int auto_increment NOT NULL, 352 362 name text, 353 363 status smallint, 354 364 rank int, 355 365 creator_id int NOT NULL, 356 create_date datetime NOT NULL , 357 update_date datetime, 358 del_flg smallint NOT NULL DEFAULT 0, 359 product_id int 360 ) TYPE=InnoDB ; 366 create_date datetime NOT NULL, 367 update_date datetime, 368 del_flg smallint NOT NULL DEFAULT 0, 369 product_id int, 370 PRIMARY KEY (class_id) 371 ) TYPE=InnoDB; 361 372 362 373 CREATE TABLE dtb_classcategory ( 363 classcategory_id int auto_increment primary keyNOT NULL,374 classcategory_id int auto_increment NOT NULL, 364 375 name text, 365 376 class_id int NOT NULL, … … 367 378 rank int, 368 379 creator_id int NOT NULL, 369 create_date datetime NOT NULL , 370 update_date datetime, 371 del_flg smallint NOT NULL DEFAULT 0 372 ) TYPE=InnoDB ; 380 create_date datetime NOT NULL, 381 update_date datetime, 382 del_flg smallint NOT NULL DEFAULT 0, 383 PRIMARY KEY (classcategory_id) 384 ) TYPE=InnoDB; 373 385 374 386 CREATE TABLE dtb_category ( 375 category_id int auto_increment primary keyNOT NULL,387 category_id int auto_increment NOT NULL, 376 388 category_name text, 377 389 parent_category_id int NOT NULL DEFAULT 0, … … 379 391 rank int, 380 392 creator_id int NOT NULL, 381 create_date datetime NOT NULL , 382 update_date datetime, 383 del_flg smallint NOT NULL DEFAULT 0 384 ) TYPE=InnoDB ; 393 create_date datetime NOT NULL, 394 update_date datetime, 395 del_flg smallint NOT NULL DEFAULT 0, 396 PRIMARY KEY (category_id) 397 ) TYPE=InnoDB; 385 398 386 399 CREATE TABLE dtb_product_categories ( 387 product_id int 4NOT NULL,388 category_id int 4NOT NULL,389 rank int 4NOT NULL,400 product_id int NOT NULL, 401 category_id int NOT NULL, 402 rank int NOT NULL, 390 403 PRIMARY KEY(product_id, category_id) 391 404 ) TYPE=InnoDB; … … 403 416 total numeric NOT NULL DEFAULT 0, 404 417 total_average numeric NOT NULL DEFAULT 0, 405 order_date datetime NOT NULL 406 create_date datetime NOT NULL 418 order_date datetime NOT NULL, 419 create_date datetime NOT NULL, 407 420 year smallint NOT NULL, 408 421 month smallint NOT NULL, … … 413 426 key_year text NOT NULL, 414 427 key_wday text NOT NULL 415 ) TYPE=InnoDB 428 ) TYPE=InnoDB; 416 429 417 430 CREATE TABLE dtb_bat_order_daily_hour ( … … 428 441 total_average numeric NOT NULL DEFAULT 0, 429 442 hour smallint NOT NULL DEFAULT 0, 430 order_date datetime 443 order_date datetime, 431 444 create_date datetime NOT NULL 432 ) TYPE=InnoDB 445 ) TYPE=InnoDB; 433 446 434 447 CREATE TABLE dtb_recommend_products ( … … 439 452 status smallint NOT NULL DEFAULT 0, 440 453 creator_id int NOT NULL, 441 create_date datetime NOT NULL 454 create_date datetime NOT NULL, 442 455 update_date datetime NOT NULL 443 ) TYPE=InnoDB 456 ) TYPE=InnoDB; 444 457 445 458 CREATE TABLE dtb_review ( 446 review_id int auto_increment primary keyNOT NULL,459 review_id int auto_increment NOT NULL, 447 460 product_id int NOT NULL, 448 461 reviewer_name text NOT NULL, … … 457 470 create_date datetime, 458 471 update_date datetime, 459 del_flg smallint NOT NULL DEFAULT 0 460 ) TYPE=InnoDB ; 472 del_flg smallint NOT NULL DEFAULT 0, 473 PRIMARY KEY (review_id) 474 ) TYPE=InnoDB; 461 475 462 476 CREATE TABLE dtb_customer_reading ( … … 465 479 create_date datetime NOT NULL, 466 480 update_date datetime NOT NULL 467 ) TYPE=InnoDB 481 ) TYPE=InnoDB; 468 482 469 483 CREATE TABLE dtb_customer_favorite_products ( … … 472 486 create_date datetime NOT NULL, 473 487 update_date datetime NOT NULL 474 ) TYPE=InnoDB 488 ) TYPE=InnoDB; 475 489 476 490 CREATE TABLE dtb_category_count ( … … 478 492 product_count int NOT NULL, 479 493 create_date datetime NOT NULL 480 ) TYPE=InnoDB 494 ) TYPE=InnoDB; 481 495 482 496 CREATE TABLE dtb_category_total_count ( … … 484 498 product_count int, 485 499 create_date datetime NOT NULL 486 ) TYPE=InnoDB 500 ) TYPE=InnoDB; 487 501 488 502 CREATE TABLE dtb_news ( 489 news_id int auto_increment primary keyNOT NULL,503 news_id int auto_increment NOT NULL, 490 504 news_date datetime, 491 505 rank int, … … 496 510 link_method text, 497 511 creator_id int NOT NULL, 498 create_date datetime NOT NULL , 499 update_date datetime, 500 del_flg smallint NOT NULL DEFAULT 0 501 ) TYPE=InnoDB ; 512 create_date datetime NOT NULL, 513 update_date datetime, 514 del_flg smallint NOT NULL DEFAULT 0, 515 PRIMARY KEY (news_id) 516 ) TYPE=InnoDB; 502 517 503 518 CREATE TABLE dtb_best_products ( 504 best_id int auto_increment primary keyNOT NULL,519 best_id int auto_increment NOT NULL, 505 520 category_id int NOT NULL, 506 521 rank int NOT NULL DEFAULT 0, … … 509 524 comment text, 510 525 creator_id int NOT NULL, 511 create_date datetime NOT NULL , 512 update_date datetime, 513 del_flg smallint NOT NULL DEFAULT 0 514 ) TYPE=InnoDB ; 526 create_date datetime NOT NULL, 527 update_date datetime, 528 del_flg smallint NOT NULL DEFAULT 0, 529 PRIMARY KEY (best_id) 530 ) TYPE=InnoDB; 515 531 516 532 CREATE TABLE dtb_mail_history ( 517 send_id int auto_increment primary keyNOT NULL,533 send_id int auto_increment NOT NULL, 518 534 order_id int NOT NULL, 519 535 send_date datetime, … … 521 537 creator_id int NOT NULL, 522 538 subject text, 523 mail_body text 524 ) TYPE=InnoDB ; 539 mail_body text, 540 PRIMARY KEY (send_id) 541 ) TYPE=InnoDB; 525 542 526 543 CREATE TABLE dtb_customer ( 527 customer_id int auto_increment primary keyNOT NULL,544 customer_id int auto_increment NOT NULL, 528 545 name01 text NOT NULL, 529 546 name02 text NOT NULL, … … 557 574 note text, 558 575 status smallint NOT NULL DEFAULT 1, 559 create_date datetime NOT NULL 560 update_date datetime 576 create_date datetime NOT NULL, 577 update_date datetime, 561 578 del_flg smallint NOT NULL DEFAULT 0, 562 579 cell01 text, … … 564 581 cell03 text, 565 582 mobile_phone_id text, 566 mailmaga_flg smallint 567 ) TYPE=InnoDB ; 583 mailmaga_flg smallint, 584 PRIMARY KEY (customer_id) 585 ) TYPE=InnoDB; 568 586 569 587 CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64)); … … 577 595 create_data datetime NOT NULL, 578 596 PRIMARY KEY (temp_id) 579 ) TYPE=InnoDB 597 ) TYPE=InnoDB; 580 598 581 599 CREATE TABLE dtb_order ( 582 order_id int auto_increment primary keyNOT NULL,600 order_id int auto_increment NOT NULL, 583 601 order_temp_id text, 584 602 customer_id int NOT NULL, … … 636 654 note text, 637 655 status smallint, 638 create_date datetime NOT NULL 656 create_date datetime NOT NULL, 639 657 loan_result text, 640 658 credit_result text, … … 658 676 memo09 text, 659 677 memo10 text, 660 campaign_id int 661 ) TYPE=InnoDB ; 678 campaign_id int, 679 PRIMARY KEY (order_id) 680 ) TYPE=InnoDB; 662 681 663 682 CREATE TABLE dtb_order_temp ( … … 723 742 credit_result text, 724 743 credit_msg text, 725 create_date datetime NOT NULL 744 create_date datetime NOT NULL, 726 745 update_date datetime, 727 746 del_flg smallint NOT NULL DEFAULT 0, … … 731 750 cell02 text, 732 751 cell03 text, 733 order_id int 4,752 order_id int, 734 753 memo01 text, 735 754 memo02 text, … … 743 762 memo10 text, 744 763 session text 745 ) TYPE=InnoDB 764 ) TYPE=InnoDB; 746 765 747 766 CREATE TABLE dtb_other_deliv ( 748 other_deliv_id int auto_increment primary keyNOT NULL,767 other_deliv_id int auto_increment NOT NULL, 749 768 customer_id int NOT NULL, 750 769 name01 text, … … 759 778 tel01 text, 760 779 tel02 text, 761 tel03 text 762 ) TYPE=InnoDB ; 780 tel03 text, 781 PRIMARY KEY (other_deliv_id) 782 ) TYPE=InnoDB; 763 783 764 784 CREATE TABLE dtb_order_detail ( … … 774 794 quantity numeric, 775 795 point_rate numeric 776 ) TYPE=InnoDB 796 ) TYPE=InnoDB; 777 797 778 798 CREATE TABLE mtb_pref ( 779 pref_id smallint primary keyNOT NULL,799 pref_id smallint NOT NULL, 780 800 pref_name text, 781 rank smallint NOT NULL DEFAULT 0 782 ) TYPE=InnoDB ; 801 rank smallint NOT NULL DEFAULT 0, 802 PRIMARY KEY (pref_id) 803 ) TYPE=InnoDB; 783 804 784 805 CREATE TABLE dtb_member ( 785 member_id int auto_increment primary keyNOT NULL,806 member_id int auto_increment NOT NULL, 786 807 name text, 787 808 department text, … … 794 815 creator_id int NOT NULL, 795 816 update_date datetime, 796 create_date datetime NOT NULL , 797 login_date datetime 798 ) TYPE=InnoDB ; 817 create_date datetime NOT NULL, 818 login_date datetime, 819 PRIMARY KEY (member_id) 820 ) TYPE=InnoDB; 799 821 800 822 CREATE TABLE dtb_question ( 801 question_id int auto_increment primary keyNOT NULL,823 question_id int auto_increment NOT NULL, 802 824 question_name text, 803 825 question text, 804 create_date datetime NOT NULL , 805 del_flg smallint NOT NULL DEFAULT 0 806 ) TYPE=InnoDB ; 826 create_date datetime NOT NULL, 827 del_flg smallint NOT NULL DEFAULT 0, 828 PRIMARY KEY (question_id) 829 ) TYPE=InnoDB; 807 830 808 831 CREATE TABLE dtb_question_result ( 809 result_id int auto_increment primary keyNOT NULL,832 result_id int auto_increment NOT NULL, 810 833 question_id int NOT NULL, 811 834 question_date datetime, … … 830 853 question05 text, 831 854 question06 text, 832 create_date datetime NOT NULL , 833 del_flg smallint NOT NULL DEFAULT 0 834 ) TYPE=InnoDB ; 855 create_date datetime NOT NULL, 856 del_flg smallint NOT NULL DEFAULT 0, 857 PRIMARY KEY (result_id) 858 ) TYPE=InnoDB; 835 859 836 860 CREATE TABLE dtb_bat_relate_products ( … … 839 863 customer_id int, 840 864 create_date datetime 841 ) TYPE=InnoDB 865 ) TYPE=InnoDB; 842 866 843 867 CREATE TABLE dtb_campaign ( 844 campaign_id int auto_increment primary keyNOT NULL,868 campaign_id int auto_increment NOT NULL, 845 869 campaign_name text, 846 870 campaign_point_rate numeric NOT NULL, … … 849 873 end_date datetime NOT NULL, 850 874 directory_name text NOT NULL, 851 limit_count int 4NOT NULL DEFAULT 0,852 total_count int 4NOT NULL DEFAULT 0,853 orverlapping_flg int2NOT NULL DEFAULT 0,854 cart_flg int2NOT NULL DEFAULT 0,855 deliv_free_flg int2NOT NULL DEFAULT 0,875 limit_count int NOT NULL DEFAULT 0, 876 total_count int NOT NULL DEFAULT 0, 877 orverlapping_flg smallint NOT NULL DEFAULT 0, 878 cart_flg smallint NOT NULL DEFAULT 0, 879 deliv_free_flg smallint NOT NULL DEFAULT 0, 856 880 search_condition text, 857 881 del_flg smallint NOT NULL DEFAULT 0, 858 882 create_date datetime NOT NULL, 859 update_date datetime NOT NULL 860 ) TYPE=InnoDB ; 883 update_date datetime NOT NULL, 884 PRIMARY KEY (campaign_id) 885 ) TYPE=InnoDB; 861 886 862 887 CREATE TABLE dtb_campaign_detail ( … … 864 889 product_id int NOT NULL, 865 890 campaign_point_rate numeric NOT NULL 866 ) TYPE=InnoDB 891 ) TYPE=InnoDB; 867 892 868 893 CREATE TABLE dtb_pagelayout ( 869 page_id int auto_increment primary keyNOT NULL,894 page_id int auto_increment NOT NULL, 870 895 page_name text, 871 896 url text NOT NULL, … … 880 905 keyword text, 881 906 update_url text, 882 create_date datetime NOT NULL , 883 update_date datetime NOT NULL 884 ) TYPE=InnoDB ; 907 create_date datetime NOT NULL, 908 update_date datetime NOT NULL, 909 PRIMARY KEY (page_id) 910 ) TYPE=InnoDB; 885 911 886 912 CREATE TABLE dtb_bloc ( 887 bloc_id int auto_increment primary keyNOT NULL,913 bloc_id int auto_increment NOT NULL, 888 914 bloc_name text, 889 915 tpl_path text, 890 916 filename varchar(50) NOT NULL UNIQUE, 891 create_date datetime NOT NULL 892 update_date datetime NOT NULL 917 create_date datetime NOT NULL, 918 update_date datetime NOT NULL, 893 919 php_path text, 894 del_flg smallint NOT NULL DEFAULT 0 895 ) TYPE=InnoDB ; 920 del_flg smallint NOT NULL DEFAULT 0, 921 PRIMARY KEY (bloc_id) 922 ) TYPE=InnoDB; 896 923 897 924 CREATE TABLE dtb_blocposition ( … … 902 929 filename text, 903 930 anywhere int DEFAULT 0 NOT NULL 904 ) TYPE=InnoDB 931 ) TYPE=InnoDB; 905 932 906 933 CREATE TABLE dtb_csv ( 907 no int auto_increment primary key,934 no int auto_increment, 908 935 csv_id int NOT NULL, 909 936 col text, … … 911 938 rank int, 912 939 status smallint NOT NULL DEFAULT 1, 913 create_date datetime NOT NULL , 914 update_date datetime NOT NULL 915 ) TYPE=InnoDB ; 940 create_date datetime NOT NULL, 941 update_date datetime NOT NULL, 942 PRIMARY KEY (no) 943 ) TYPE=InnoDB; 916 944 917 945 CREATE TABLE dtb_csv_sql ( 918 sql_id int auto_increment primary key,946 sql_id int auto_increment, 919 947 sql_name text NOT NULL, 920 948 csv_sql text, 921 949 update_date datetime NOT NULL, 922 create_date datetime NOT NULL 923 ) TYPE=InnoDB ; 950 create_date datetime NOT NULL, 951 PRIMARY KEY (sql_id) 952 ) TYPE=InnoDB; 924 953 925 954 CREATE TABLE dtb_user_regist ( 926 user_id int auto_increment primary keyNOT NULL,955 user_id int auto_increment NOT NULL, 927 956 org_name text, 928 957 post_name text, … … 938 967 del_flg smallint DEFAULT 0, 939 968 create_date datetime NOT NULL, 940 update_date datetime NOT NULL 941 ) TYPE=InnoDB ; 969 update_date datetime NOT NULL, 970 PRIMARY KEY (user_id) 971 ) TYPE=InnoDB; 942 972 943 973 CREATE TABLE dtb_templates 944 974 ( 945 template_code varchar(50) primary key NOT NULL, 946 template_name text , 947 create_date datetime NOT NULL , 948 update_date datetime NOT NULL 949 ) TYPE=InnoDB ; 975 template_code varchar(50) NOT NULL, 976 template_name text, 977 create_date datetime NOT NULL, 978 update_date datetime NOT NULL, 979 PRIMARY KEY (template_code) 980 ) TYPE=InnoDB; 950 981 951 982 CREATE TABLE dtb_table_comment 952 983 ( 953 id int auto_increment primary key, 954 table_name text, 955 column_name text, 956 description text 957 ) TYPE=InnoDB ; 984 id int auto_increment, 985 table_name text, 986 column_name text, 987 description text, 988 PRIMARY KEY (id) 989 ) TYPE=InnoDB; 958 990 959 991 CREATE TABLE dtb_maker ( 960 maker_id INT auto_increment primary key,992 maker_id int auto_increment, 961 993 name text NOT NULL, 962 994 rank int NOT NULL DEFAULT 0, … … 964 996 create_date datetime NOT NULL, 965 997 update_date datetime NOT NULL, 966 del_flg smallint NOT NULL DEFAULT 0 967 ) TYPE=InnoDB ; 998 del_flg smallint NOT NULL DEFAULT 0, 999 PRIMARY KEY (maker_id) 1000 ) TYPE=InnoDB; 968 1001 969 1002 CREATE TABLE dtb_maker_count ( … … 971 1004 product_count int NOT NULL, 972 1005 create_date datetime NOT NULL 973 ) TYPE=InnoDB 1006 ) TYPE=InnoDB; 974 1007 975 1008 … … 977 1010 id text, 978 1011 name text, 979 rank int2NOT NULL DEFAULT 0,1012 rank smallint NOT NULL DEFAULT 0, 980 1013 PRIMARY KEY (id(32)) 981 1014 ) TYPE=InnoDB; 982 1015 983 1016 CREATE TABLE mtb_disable_logout ( 984 id int2,985 name text, 986 rank int2NOT NULL DEFAULT 0,1017 id smallint, 1018 name text, 1019 rank smallint NOT NULL DEFAULT 0, 987 1020 PRIMARY KEY (id) 988 1021 ) TYPE=InnoDB; 989 1022 990 1023 CREATE TABLE mtb_authority ( 991 id int2,992 name text, 993 rank int2NOT NULL DEFAULT 0,1024 id smallint, 1025 name text, 1026 rank smallint NOT NULL DEFAULT 0, 994 1027 PRIMARY KEY (id) 995 1028 ) TYPE=InnoDB; 996 1029 997 1030 CREATE TABLE mtb_work ( 998 id int2,999 name text, 1000 rank int2NOT NULL DEFAULT 0,1031 id smallint, 1032 name text, 1033 rank smallint NOT NULL DEFAULT 0, 1001 1034 PRIMARY KEY (id) 1002 1035 ) TYPE=InnoDB; 1003 1036 1004 1037 CREATE TABLE mtb_disp ( 1005 id int2,1006 name text, 1007 rank int2NOT NULL DEFAULT 0,1038 id smallint, 1039 name text, 1040 rank smallint NOT NULL DEFAULT 0, 1008 1041 PRIMARY KEY (id) 1009 1042 ) TYPE=InnoDB; 1010 1043 1011 1044 CREATE TABLE mtb_class ( 1012 id int2,1013 name text, 1014 rank int2NOT NULL DEFAULT 0,1045 id smallint, 1046 name text, 1047 rank smallint NOT NULL DEFAULT 0, 1015 1048 PRIMARY KEY (id) 1016 1049 ) TYPE=InnoDB; 1017 1050 1018 1051 CREATE TABLE mtb_srank ( 1019 id int2,1020 name text, 1021 rank int2NOT NULL DEFAULT 0,1052 id smallint, 1053 name text, 1054 rank smallint NOT NULL DEFAULT 0, 1022 1055 PRIMARY KEY (id) 1023 1056 ) TYPE=InnoDB; 1024 1057 1025 1058 CREATE TABLE mtb_status ( 1026 id int2,1027 name text, 1028 rank int2NOT NULL DEFAULT 0,1059 id smallint, 1060 name text, 1061 rank smallint NOT NULL DEFAULT 0, 1029 1062 PRIMARY KEY (id) 1030 1063 ) TYPE=InnoDB; 1031 1064 1032 1065 CREATE TABLE mtb_status_image ( 1033 id int2,1034 name text, 1035 rank int2NOT NULL DEFAULT 0,1066 id smallint, 1067 name text, 1068 rank smallint NOT NULL DEFAULT 0, 1036 1069 PRIMARY KEY (id) 1037 1070 ) TYPE=InnoDB; 1038 1071 1039 1072 CREATE TABLE mtb_allowed_tag ( 1040 id int2,1041 name text, 1042 rank int2NOT NULL DEFAULT 0,1073 id smallint, 1074 name text, 1075 rank smallint NOT NULL DEFAULT 0, 1043 1076 PRIMARY KEY (id) 1044 1077 ) TYPE=InnoDB; 1045 1078 1046 1079 CREATE TABLE mtb_page_max ( 1047 id int2,1048 name text, 1049 rank int2NOT NULL DEFAULT 0,1080 id smallint, 1081 name text, 1082 rank smallint NOT NULL DEFAULT 0, 1050 1083 PRIMARY KEY (id) 1051 1084 ) TYPE=InnoDB; 1052 1085 1053 1086 CREATE TABLE mtb_magazine_type ( 1054 id int2,1055 name text, 1056 rank int2NOT NULL DEFAULT 0,1087 id smallint, 1088 name text, 1089 rank smallint NOT NULL DEFAULT 0, 1057 1090 PRIMARY KEY (id) 1058 1091 ) TYPE=InnoDB; 1059 1092 1060 1093 CREATE TABLE mtb_mail_magazine_type ( 1061 id int2,1062 name text, 1063 rank int2NOT NULL DEFAULT 0,1094 id smallint, 1095 name text, 1096 rank smallint NOT NULL DEFAULT 0, 1064 1097 PRIMARY KEY (id) 1065 1098 ) TYPE=InnoDB; 1066 1099 1067 1100 CREATE TABLE mtb_recommend ( 1068 id int2,1069 name text, 1070 rank int2NOT NULL DEFAULT 0,1101 id smallint, 1102 name text, 1103 rank smallint NOT NULL DEFAULT 0, 1071 1104 PRIMARY KEY (id) 1072 1105 ) TYPE=InnoDB; 1073 1106 1074 1107 CREATE TABLE mtb_taxrule ( 1075 id int2,1076 name text, 1077 rank int2NOT NULL DEFAULT 0,1108 id smallint, 1109 name text, 1110 rank smallint NOT NULL DEFAULT 0, 1078 1111 PRIMARY KEY (id) 1079 1112 ) TYPE=InnoDB; 1080 1113 1081 1114 CREATE TABLE mtb_mail_template ( 1082 id int2,1083 name text, 1084 rank int2NOT NULL DEFAULT 0,1115 id smallint, 1116 name text, 1117 rank smallint NOT NULL DEFAULT 0, 1085 1118 PRIMARY KEY (id) 1086 1119 ) TYPE=InnoDB; 1087 1120 1088 1121 CREATE TABLE mtb_mail_tpl_path ( 1089 id int2,1090 name text, 1091 rank int2NOT NULL DEFAULT 0,1122 id smallint, 1123 name text, 1124 rank smallint NOT NULL DEFAULT 0, 1092 1125 PRIMARY KEY (id) 1093 1126 ) TYPE=InnoDB; 1094 1127 1095 1128 CREATE TABLE mtb_job ( 1096 id int2,1097 name text, 1098 rank int2NOT NULL DEFAULT 0,1129 id smallint, 1130 name text, 1131 rank smallint NOT NULL DEFAULT 0, 1099 1132 PRIMARY KEY (id) 1100 1133 ) TYPE=InnoDB; 1101 1134 1102 1135 CREATE TABLE mtb_reminder ( 1103 id int2,1104 name text, 1105 rank int2NOT NULL DEFAULT 0,1136 id smallint, 1137 name text, 1138 rank smallint NOT NULL DEFAULT 0, 1106 1139 PRIMARY KEY (id) 1107 1140 ) TYPE=InnoDB; 1108 1141 1109 1142 CREATE TABLE mtb_sex ( 1110 id int2,1111 name text, 1112 rank int2NOT NULL DEFAULT 0,1143 id smallint, 1144 name text, 1145 rank smallint NOT NULL DEFAULT 0, 1113 1146 PRIMARY KEY (id) 1114 1147 ) TYPE=InnoDB; 1115 1148 1116 1149 CREATE TABLE mtb_page_rows ( 1117 id int2,1118 name text, 1119 rank int2NOT NULL DEFAULT 0,1150 id smallint, 1151 name text, 1152 rank smallint NOT NULL DEFAULT 0, 1120 1153 PRIMARY KEY (id) 1121 1154 ) TYPE=InnoDB; 1122 1155 1123 1156 CREATE TABLE mtb_mail_type ( 1124 id int2,1125 name text, 1126 rank int2NOT NULL DEFAULT 0,1157 id smallint, 1158 name text, 1159 rank smallint NOT NULL DEFAULT 0, 1127 1160 PRIMARY KEY (id) 1128 1161 ) TYPE=InnoDB; 1129 1162 1130 1163 CREATE TABLE mtb_order_status ( 1131 id int2,1132 name text, 1133 rank int2NOT NULL DEFAULT 0,1164 id smallint, 1165 name text, 1166 rank smallint NOT NULL DEFAULT 0, 1134 1167 PRIMARY KEY (id) 1135 1168 ) TYPE=InnoDB; 1136 1169 1137 1170 CREATE TABLE mtb_product_status_color ( 1138 id int2,1139 name text, 1140 rank int2NOT NULL DEFAULT 0,1171 id smallint, 1172 name text, 1173 rank smallint NOT NULL DEFAULT 0, 1141 1174 PRIMARY KEY (id) 1142 1175 ) TYPE=InnoDB; 1143 1176 1144 1177 CREATE TABLE mtb_order_status_color ( 1145 id int2,1146 name text, 1147 rank int2NOT NULL DEFAULT 0,1178 id smallint, 1179 name text, 1180 rank smallint NOT NULL DEFAULT 0, 1148 1181 PRIMARY KEY (id) 1149 1182 ) TYPE=InnoDB; 1150 1183 1151 1184 CREATE TABLE mtb_wday ( 1152 id int2,1153 name text, 1154 rank int2NOT NULL DEFAULT 0,1185 id smallint, 1186 name text, 1187 rank smallint NOT NULL DEFAULT 0, 1155 1188 PRIMARY KEY (id) 1156 1189 ) TYPE=InnoDB; 1157 1190 1158 1191 CREATE TABLE mtb_delivery_date ( 1159 id int2,1160 name text, 1161 rank int2NOT NULL DEFAULT 0,1192 id smallint, 1193 name text, 1194 rank smallint NOT NULL DEFAULT 0, 1162 1195 PRIMARY KEY (id) 1163 1196 ) TYPE=InnoDB; 1164 1197 1165 1198 CREATE TABLE mtb_product_list_max ( 1166 id int2,1167 name text, 1168 rank int2NOT NULL DEFAULT 0,1199 id smallint, 1200 name text, 1201 rank smallint NOT NULL DEFAULT 0, 1169 1202 PRIMARY KEY (id) 1170 1203 ) TYPE=InnoDB; 1171 1204 1172 1205 CREATE TABLE mtb_convenience ( 1173 id int2,1174 name text, 1175 rank int2NOT NULL DEFAULT 0,1206 id smallint, 1207 name text, 1208 rank smallint NOT NULL DEFAULT 0, 1176 1209 PRIMARY KEY (id) 1177 1210 ) TYPE=InnoDB; 1178 1211 1179 1212 CREATE TABLE mtb_conveni_message ( 1180 id int2,1181 name text, 1182 rank int2NOT NULL DEFAULT 0,1213 id smallint, 1214 name text, 1215 rank smallint NOT NULL DEFAULT 0, 1183 1216 PRIMARY KEY (id) 1184 1217 ) TYPE=InnoDB; 1185 1218 1186 1219 CREATE TABLE mtb_db ( 1187 id int2,1188 name text, 1189 rank int2NOT NULL DEFAULT 0,1220 id smallint, 1221 name text, 1222 rank smallint NOT NULL DEFAULT 0, 1190 1223 PRIMARY KEY (id) 1191 1224 ) TYPE=InnoDB; 1192 1225 1193 1226 CREATE TABLE mtb_target ( 1194 id int2,1195 name text, 1196 rank int2NOT NULL DEFAULT 0,1227 id smallint, 1228 name text, 1229 rank smallint NOT NULL DEFAULT 0, 1197 1230 PRIMARY KEY (id) 1198 1231 ) TYPE=InnoDB; 1199 1232 1200 1233 CREATE TABLE mtb_review_deny_url ( 1201 id int2,1202 name text, 1203 rank int2NOT NULL DEFAULT 0,1234 id smallint, 1235 name text, 1236 rank smallint NOT NULL DEFAULT 0, 1204 1237 PRIMARY KEY (id) 1205 1238 ) TYPE=InnoDB; 1206 1239 1207 1240 CREATE TABLE mtb_track_back_status ( 1208 id int2,1209 name text, 1210 rank int2NOT NULL DEFAULT 0,1241 id smallint, 1242 name text, 1243 rank smallint NOT NULL DEFAULT 0, 1211 1244 PRIMARY KEY (id) 1212 1245 ) TYPE=InnoDB; 1213 1246 1214 1247 CREATE TABLE mtb_site_control_track_back ( 1215 id int2,1216 name text, 1217 rank int2NOT NULL DEFAULT 0,1248 id smallint, 1249 name text, 1250 rank smallint NOT NULL DEFAULT 0, 1218 1251 PRIMARY KEY (id) 1219 1252 ) TYPE=InnoDB; 1220 1253 1221 1254 CREATE TABLE mtb_site_control_affiliate ( 1222 id int2,1223 name text, 1224 rank int2NOT NULL DEFAULT 0,1255 id smallint, 1256 name text, 1257 rank smallint NOT NULL DEFAULT 0, 1225 1258 PRIMARY KEY (id) 1226 1259 ) TYPE=InnoDB; 1227 1260 1228 1261 CREATE TABLE mtb_mobile_domain ( 1229 id int2,1230 name text, 1231 rank int2NOT NULL DEFAULT 0,1262 id smallint, 1263 name text, 1264 rank smallint NOT NULL DEFAULT 0, 1232 1265 PRIMARY KEY (id) 1233 1266 ) TYPE=InnoDB; 1234 1267 1235 1268 CREATE TABLE mtb_ownersstore_err ( 1236 id int2,1237 name text, 1238 rank int2NOT NULL DEFAULT 0,1269 id smallint, 1270 name text, 1271 rank smallint NOT NULL DEFAULT 0, 1239 1272 PRIMARY KEY (id) 1240 1273 ) TYPE=InnoDB; 1241 1274 1242 1275 CREATE TABLE mtb_ownersstore_ips ( 1243 id int2,1244 name text, 1245 rank int2NOT NULL DEFAULT 0,1276 id smallint, 1277 name text, 1278 rank smallint NOT NULL DEFAULT 0, 1246 1279 PRIMARY KEY (id) 1247 1280 ) TYPE=InnoDB; … … 1250 1283 id text, 1251 1284 name text, 1252 rank int2 NOT NULL DEFAULT 0, 1253 remarks text 1254 ) TYPE=InnoDB; 1285 rank smallint NOT NULL DEFAULT 0, 1286 remarks text, 1287 PRIMARY KEY (id(64)) 1288 ) TYPE=InnoDB;
Note: See TracChangeset
for help on using the changeset viewer.