Changeset 18331
- Timestamp:
- 2009/10/15 23:53:18 (14 years ago)
- Location:
- branches/comu-ver2/html/install/sql
- Files:
-
- 2 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; -
branches/comu-ver2/html/install/sql/create_table_pgsql.sql
r18275 r18331 3 3 module_id int NOT NULL, 4 4 buckup_path text, 5 error_flg int2 default0,5 error_flg smallint DEFAULT 0, 6 6 error text, 7 7 ok text, … … 19 19 kiyaku_title text NOT NULL, 20 20 kiyaku_text text NOT NULL, 21 rank int 4NOT NULL DEFAULT 0,22 creator_id int 4NOT NULL,21 rank int NOT NULL DEFAULT 0, 22 creator_id int NOT NULL, 23 23 create_date timestamp NOT NULL DEFAULT now(), 24 24 update_date timestamp NOT NULL, 25 del_flg int2NOT NULL DEFAULT 0,25 del_flg smallint NOT NULL DEFAULT 0, 26 26 PRIMARY KEY (kiyaku_id) 27 27 ); … … 30 30 holiday_id serial NOT NULL, 31 31 title text NOT NULL, 32 month int2NOT NULL,33 day int2NOT NULL,34 rank int 4NOT NULL DEFAULT 0,35 creator_id int 4NOT NULL,32 month smallint NOT NULL, 33 day smallint NOT NULL, 34 rank int NOT NULL DEFAULT 0, 35 creator_id int NOT NULL, 36 36 create_date timestamp NOT NULL DEFAULT now(), 37 37 update_date timestamp NOT NULL, 38 del_flg int2NOT NULL DEFAULT 0,38 del_flg smallint NOT NULL DEFAULT 0, 39 39 PRIMARY KEY (holiday_id) 40 40 ); … … 62 62 total numeric NOT NULL DEFAULT 0, 63 63 total_average numeric NOT NULL DEFAULT 0, 64 start_age int2,65 end_age int2,66 member int2,64 start_age smallint, 65 end_age smallint, 66 member smallint, 67 67 order_date timestamp DEFAULT now(), 68 68 create_date timestamp NOT NULL DEFAULT now() … … 70 70 71 71 CREATE TABLE dtb_update ( 72 module_id int 4NOT NULL,72 module_id int NOT NULL, 73 73 module_name text NOT NULL, 74 74 now_version text, … … 80 80 uninstall_sql text, 81 81 other_files text, 82 del_flg int2NOT NULL DEFAULT 0,82 del_flg smallint NOT NULL DEFAULT 0, 83 83 create_date timestamp NOT NULL DEFAULT now(), 84 84 update_date timestamp, … … 92 92 zip01 text, 93 93 zip02 text, 94 pref int2,94 pref smallint, 95 95 addr01 text, 96 96 addr02 text, … … 106 106 law_zip01 text, 107 107 law_zip02 text, 108 law_pref int2,108 law_pref smallint, 109 109 law_addr01 text, 110 110 law_addr02 text, … … 128 128 law_term10 text, 129 129 tax numeric NOT NULL DEFAULT 5, 130 tax_rule int2NOT NULL DEFAULT 1,130 tax_rule smallint NOT NULL DEFAULT 1, 131 131 email01 text, 132 132 email02 text, … … 154 154 service_name text, 155 155 confirm_url text, 156 rank int 4,157 status int2NOT NULL DEFAULT 1,158 del_flg int2NOT NULL DEFAULT 0,159 creator_id int 4NOT NULL,156 rank int, 157 status smallint NOT NULL DEFAULT 1, 158 del_flg smallint NOT NULL DEFAULT 0, 159 creator_id int NOT NULL, 160 160 create_date timestamp NOT NULL DEFAULT now(), 161 161 update_date timestamp, … … 164 164 165 165 CREATE TABLE dtb_delivtime ( 166 deliv_id int 4NOT NULL,167 time_id int 4NOT NULL,166 deliv_id int NOT NULL, 167 time_id int NOT NULL, 168 168 deliv_time text NOT NULL, 169 169 PRIMARY KEY (deliv_id, time_id) … … 171 171 172 172 CREATE TABLE dtb_delivfee ( 173 deliv_id int 4NOT NULL,173 deliv_id int NOT NULL, 174 174 fee_id serial NOT NULL, 175 175 fee text NOT NULL, 176 pref int2,176 pref smallint, 177 177 PRIMARY KEY (fee_id) 178 178 ); … … 183 183 charge numeric, 184 184 rule numeric, 185 deliv_id int 4DEFAULT 0,186 rank int 4,185 deliv_id int DEFAULT 0, 186 rank int, 187 187 note text, 188 fix int2,189 status int2NOT NULL DEFAULT 1,190 del_flg int2NOT NULL DEFAULT 0,191 creator_id int 4NOT NULL,188 fix smallint, 189 status smallint NOT NULL DEFAULT 1, 190 del_flg smallint NOT NULL DEFAULT 0, 191 creator_id int NOT NULL, 192 192 create_date timestamp NOT NULL DEFAULT now(), 193 193 update_date timestamp, 194 194 payment_image text, 195 195 upper_rule numeric, 196 charge_flg int2DEFAULT 1,196 charge_flg smallint DEFAULT 1, 197 197 rule_min numeric, 198 198 upper_rule_max numeric, 199 module_id int 4,199 module_id int, 200 200 module_path text, 201 201 memo01 text, … … 213 213 214 214 CREATE TABLE dtb_mailtemplate ( 215 template_id int 4NOT NULL,215 template_id int NOT NULL, 216 216 subject text, 217 217 header text, 218 218 footer text, 219 creator_id int 4NOT NULL,220 del_flg int2NOT NULL DEFAULT 0,219 creator_id int NOT NULL, 220 del_flg smallint NOT NULL DEFAULT 0, 221 221 create_date timestamp NOT NULL DEFAULT now(), 222 222 update_date timestamp NOT NULL … … 227 227 subject text, 228 228 charge_image text, 229 mail_method int 4,229 mail_method int, 230 230 header text, 231 231 body text, 232 232 main_title text, 233 233 main_comment text, 234 main_product_id int 4,234 main_product_id int, 235 235 sub_title text, 236 236 sub_comment text, 237 sub_product_id01 int 4,238 sub_product_id02 int 4,239 sub_product_id03 int 4,240 sub_product_id04 int 4,241 sub_product_id05 int 4,242 sub_product_id06 int 4,243 sub_product_id07 int 4,244 sub_product_id08 int 4,245 sub_product_id09 int 4,246 sub_product_id10 int 4,247 sub_product_id11 int 4,248 sub_product_id12 int 4,249 del_flg int2NOT NULL DEFAULT 0,250 creator_id int 4NOT NULL,237 sub_product_id01 int, 238 sub_product_id02 int, 239 sub_product_id03 int, 240 sub_product_id04 int, 241 sub_product_id05 int, 242 sub_product_id06 int, 243 sub_product_id07 int, 244 sub_product_id08 int, 245 sub_product_id09 int, 246 sub_product_id10 int, 247 sub_product_id11 int, 248 sub_product_id12 int, 249 del_flg smallint NOT NULL DEFAULT 0, 250 creator_id int NOT NULL, 251 251 create_date timestamp NOT NULL DEFAULT now(), 252 252 update_date timestamp, … … 256 256 CREATE TABLE dtb_send_history ( 257 257 send_id serial NOT NULL, 258 mail_method int2,258 mail_method smallint, 259 259 subject text, 260 260 body text, 261 send_count int 4,262 complete_count int 4NOT NULL DEFAULT 0,261 send_count int, 262 complete_count int NOT NULL DEFAULT 0, 263 263 start_date timestamp, 264 264 end_date timestamp, 265 265 search_data text, 266 del_flg int2NOT NULL DEFAULT 0,267 creator_id int 4NOT NULL,266 del_flg smallint NOT NULL DEFAULT 0, 267 creator_id int NOT NULL, 268 268 create_date timestamp NOT NULL DEFAULT now(), 269 269 update_date timestamp NOT NULL DEFAULT now(), … … 272 272 273 273 CREATE TABLE dtb_send_customer ( 274 customer_id int 4,274 customer_id int, 275 275 send_id serial NOT NULL, 276 276 email text, 277 277 name text, 278 send_flag int2278 send_flag smallint 279 279 ); 280 280 … … 284 284 deliv_fee numeric, 285 285 sale_limit numeric, 286 category_id int 4,287 maker_id int 4,288 rank int 4,289 status int2NOT NULL DEFAULT 2,286 category_id int, 287 maker_id int, 288 rank int, 289 status smallint NOT NULL DEFAULT 2, 290 290 product_flag text, 291 291 point_rate numeric, … … 332 332 sub_image6 text, 333 333 sub_large_image6 text, 334 del_flg int2NOT NULL DEFAULT 0,335 creator_id int 4NOT NULL,336 create_date timestamp NOT NULL DEFAULT now(), 337 update_date timestamp, 338 deliv_date_id int 4,334 del_flg smallint NOT NULL DEFAULT 0, 335 creator_id int NOT NULL, 336 create_date timestamp NOT NULL DEFAULT now(), 337 update_date timestamp, 338 deliv_date_id int, 339 339 PRIMARY KEY (product_id) 340 340 ); … … 342 342 CREATE TABLE dtb_products_class ( 343 343 product_class_id serial NOT NULL, 344 product_id int 4NOT NULL,345 classcategory_id1 int 4NOT NULL DEFAULT 0,346 classcategory_id2 int 4NOT NULL DEFAULT 0,344 product_id int NOT NULL, 345 classcategory_id1 int NOT NULL DEFAULT 0, 346 classcategory_id2 int NOT NULL DEFAULT 0, 347 347 product_code text, 348 348 stock numeric, 349 stock_unlimited int2NOT NULL DEFAULT 0,349 stock_unlimited smallint NOT NULL DEFAULT 0, 350 350 sale_limit numeric, 351 351 price01 numeric, 352 352 price02 numeric, 353 status int2,354 creator_id int 4NOT NULL,353 status smallint, 354 creator_id int NOT NULL, 355 355 create_date timestamp NOT NULL DEFAULT now(), 356 356 update_date timestamp, … … 361 361 class_id serial NOT NULL, 362 362 name text, 363 status int2,364 rank int 4,365 creator_id int 4NOT NULL,366 create_date timestamp NOT NULL DEFAULT now(), 367 update_date timestamp, 368 del_flg int2NOT NULL DEFAULT 0,369 product_id int 4,363 status smallint, 364 rank int, 365 creator_id int NOT NULL, 366 create_date timestamp NOT NULL DEFAULT now(), 367 update_date timestamp, 368 del_flg smallint NOT NULL DEFAULT 0, 369 product_id int, 370 370 PRIMARY KEY (class_id) 371 371 ); … … 374 374 classcategory_id serial NOT NULL, 375 375 name text, 376 class_id int 4NOT NULL,377 status int2,378 rank int 4,379 creator_id int 4NOT NULL,380 create_date timestamp NOT NULL DEFAULT now(), 381 update_date timestamp, 382 del_flg int2NOT NULL DEFAULT 0,376 class_id int NOT NULL, 377 status smallint, 378 rank int, 379 creator_id int NOT NULL, 380 create_date timestamp NOT NULL DEFAULT now(), 381 update_date timestamp, 382 del_flg smallint NOT NULL DEFAULT 0, 383 383 PRIMARY KEY (classcategory_id) 384 384 ); … … 387 387 category_id serial NOT NULL, 388 388 category_name text, 389 parent_category_id int 4NOT NULL DEFAULT 0,390 level int 4NOT NULL,391 rank int 4,392 creator_id int 4NOT NULL,393 create_date timestamp NOT NULL DEFAULT now(), 394 update_date timestamp, 395 del_flg int2NOT NULL DEFAULT 0,389 parent_category_id int NOT NULL DEFAULT 0, 390 level int NOT NULL, 391 rank int, 392 creator_id int NOT NULL, 393 create_date timestamp NOT NULL DEFAULT now(), 394 update_date timestamp, 395 del_flg smallint NOT NULL DEFAULT 0, 396 396 PRIMARY KEY (category_id) 397 397 ); 398 398 399 399 CREATE TABLE dtb_product_categories ( 400 product_id int 4NOT NULL,401 category_id int 4NOT NULL,402 rank int 4NOT NULL,400 product_id int NOT NULL, 401 category_id int NOT NULL, 402 rank int NOT NULL, 403 403 PRIMARY KEY(product_id, category_id) 404 404 ); … … 418 418 order_date timestamp NOT NULL DEFAULT now(), 419 419 create_date timestamp NOT NULL DEFAULT now(), 420 year int2NOT NULL,421 month int2NOT NULL,422 day int2NOT NULL,423 wday int2NOT NULL,420 year smallint NOT NULL, 421 month smallint NOT NULL, 422 day smallint NOT NULL, 423 wday smallint NOT NULL, 424 424 key_day text NOT NULL, 425 425 key_month text NOT NULL, … … 440 440 total numeric NOT NULL DEFAULT 0, 441 441 total_average numeric NOT NULL DEFAULT 0, 442 hour int2NOT NULL DEFAULT 0,442 hour smallint NOT NULL DEFAULT 0, 443 443 order_date timestamp DEFAULT now(), 444 444 create_date timestamp NOT NULL DEFAULT now() … … 446 446 447 447 CREATE TABLE dtb_recommend_products ( 448 product_id int 4NOT NULL,449 recommend_product_id int 4NOT NULL,450 rank int 4NOT NULL,448 product_id int NOT NULL, 449 recommend_product_id int NOT NULL, 450 rank int NOT NULL, 451 451 comment text, 452 status int2NOT NULL DEFAULT 0,453 creator_id int 4NOT NULL,452 status smallint NOT NULL DEFAULT 0, 453 creator_id int NOT NULL, 454 454 create_date timestamp NOT NULL DEFAULT now(), 455 455 update_date timestamp NOT NULL DEFAULT now() … … 458 458 CREATE TABLE dtb_review ( 459 459 review_id serial NOT NULL, 460 product_id int 4NOT NULL,460 product_id int NOT NULL, 461 461 reviewer_name text NOT NULL, 462 462 reviewer_url text, 463 sex int2,464 customer_id int 4,465 recommend_level int2NOT NULL,463 sex smallint, 464 customer_id int, 465 recommend_level smallint NOT NULL, 466 466 title text NOT NULL, 467 467 comment text NOT NULL, 468 status int2DEFAULT 2,469 creator_id int 4NOT NULL,470 create_date timestamp NOT NULL DEFAULT now(), 471 update_date timestamp, 472 del_flg int2NOT NULL DEFAULT 0,468 status smallint DEFAULT 2, 469 creator_id int NOT NULL, 470 create_date timestamp NOT NULL DEFAULT now(), 471 update_date timestamp, 472 del_flg smallint NOT NULL DEFAULT 0, 473 473 PRIMARY KEY (review_id) 474 474 ); 475 475 476 476 CREATE TABLE dtb_customer_reading ( 477 reading_product_id int 4NOT NULL,478 customer_id int 4NOT NULL,477 reading_product_id int NOT NULL, 478 customer_id int NOT NULL, 479 479 create_date timestamp NOT NULL, 480 480 update_date timestamp NOT NULL DEFAULT NOW() … … 482 482 483 483 CREATE TABLE dtb_customer_favorite_products ( 484 customer_id int 4NOT NULL,485 product_id int 4NOT NULL,484 customer_id int NOT NULL, 485 product_id int NOT NULL, 486 486 create_date timestamp NOT NULL DEFAULT now(), 487 487 update_date timestamp NOT NULL DEFAULT now(), … … 490 490 491 491 CREATE TABLE dtb_category_count ( 492 category_id int 4NOT NULL,493 product_count int 4NOT NULL,492 category_id int NOT NULL, 493 product_count int NOT NULL, 494 494 create_date timestamp NOT NULL DEFAULT Now() 495 495 ); 496 496 497 497 CREATE TABLE dtb_category_total_count ( 498 category_id int 4NOT NULL,499 product_count int 4,498 category_id int NOT NULL, 499 product_count int, 500 500 create_date timestamp NOT NULL DEFAULT Now() 501 501 ); … … 504 504 news_id serial NOT NULL, 505 505 news_date timestamp, 506 rank int 4,506 rank int, 507 507 news_title text NOT NULL, 508 508 news_comment text, 509 509 news_url text, 510 news_select int2NOT NULL DEFAULT 0,510 news_select smallint NOT NULL DEFAULT 0, 511 511 link_method text, 512 creator_id int 4NOT NULL,513 create_date timestamp NOT NULL DEFAULT now(), 514 update_date timestamp, 515 del_flg int2NOT NULL DEFAULT 0,512 creator_id int NOT NULL, 513 create_date timestamp NOT NULL DEFAULT now(), 514 update_date timestamp, 515 del_flg smallint NOT NULL DEFAULT 0, 516 516 PRIMARY KEY (news_id) 517 517 ); … … 519 519 CREATE TABLE dtb_best_products ( 520 520 best_id serial NOT NULL, 521 category_id int 4NOT NULL,522 rank int 4NOT NULL DEFAULT 0,523 product_id int 4NOT NULL,521 category_id int NOT NULL, 522 rank int NOT NULL DEFAULT 0, 523 product_id int NOT NULL, 524 524 title text, 525 525 comment text, 526 creator_id int 4NOT NULL,527 create_date timestamp NOT NULL DEFAULT now(), 528 update_date timestamp, 529 del_flg int2NOT NULL DEFAULT 0,526 creator_id int NOT NULL, 527 create_date timestamp NOT NULL DEFAULT now(), 528 update_date timestamp, 529 del_flg smallint NOT NULL DEFAULT 0, 530 530 PRIMARY KEY (best_id) 531 531 ); 532 532 533 533 CREATE TABLE dtb_mail_history ( 534 send_id serial 535 order_id int 4NOT NULL,534 send_id serial NOT NULL, 535 order_id int NOT NULL, 536 536 send_date timestamp, 537 template_id int 4,538 creator_id int 4NOT NULL,537 template_id int, 538 creator_id int NOT NULL, 539 539 subject text, 540 540 mail_body text, … … 543 543 544 544 CREATE TABLE dtb_customer ( 545 customer_id serial 545 customer_id serial NOT NULL, 546 546 name01 text NOT NULL, 547 547 name02 text NOT NULL, … … 550 550 zip01 text, 551 551 zip02 text, 552 pref int2,552 pref smallint, 553 553 addr01 text, 554 554 addr02 text, … … 561 561 fax02 text, 562 562 fax03 text, 563 sex int2,564 job int2,563 sex smallint, 564 job smallint, 565 565 birth timestamp, 566 566 password text, 567 reminder int2,567 reminder smallint, 568 568 reminder_answer text, 569 569 secret_key text NOT NULL UNIQUE, … … 574 574 point numeric DEFAULT 0, 575 575 note text, 576 status int2NOT NULL DEFAULT 1,576 status smallint NOT NULL DEFAULT 1, 577 577 create_date timestamp NOT NULL DEFAULT now(), 578 578 update_date timestamp DEFAULT now(), 579 del_flg int2NOT NULL DEFAULT 0,579 del_flg smallint NOT NULL DEFAULT 0, 580 580 cell01 text, 581 581 cell02 text, 582 582 cell03 text, 583 583 mobile_phone_id text, 584 mailmaga_flg int2,584 mailmaga_flg smallint, 585 585 PRIMARY KEY (customer_id) 586 586 ); … … 590 590 CREATE TABLE dtb_customer_mail_temp ( 591 591 email text NOT NULL UNIQUE, 592 mail_flag int2,592 mail_flag smallint, 593 593 temp_id text NOT NULL, 594 end_flag int2,594 end_flag smallint, 595 595 update_date timestamp NOT NULL DEFAULT Now(), 596 596 create_data timestamp NOT NULL DEFAULT Now(), … … 601 601 order_id serial NOT NULL, 602 602 order_temp_id text, 603 customer_id int 4NOT NULL,603 customer_id int NOT NULL, 604 604 message text, 605 605 order_name01 text, … … 619 619 order_addr01 text, 620 620 order_addr02 text, 621 order_sex int2,621 order_sex smallint, 622 622 order_birth timestamp, 623 order_job int 4,623 order_job int, 624 624 deliv_name01 text, 625 625 deliv_name02 text, … … 647 647 total numeric, 648 648 payment_total numeric, 649 payment_id int 4,649 payment_id int, 650 650 payment_method text, 651 deliv_id int 4,652 deliv_time_id int 4,651 deliv_id int, 652 deliv_time_id int, 653 653 deliv_time text, 654 654 deliv_no text, 655 655 note text, 656 status int2,656 status smallint, 657 657 create_date timestamp NOT NULL DEFAULT now(), 658 658 loan_result text, … … 661 661 update_date timestamp, 662 662 commit_date timestamp, 663 del_flg int2NOT NULL DEFAULT 0,663 del_flg smallint NOT NULL DEFAULT 0, 664 664 deliv_date text, 665 665 conveni_data text, … … 677 677 memo09 text, 678 678 memo10 text, 679 campaign_id int 4,679 campaign_id int, 680 680 PRIMARY KEY (order_id) 681 681 ); … … 683 683 CREATE TABLE dtb_order_temp ( 684 684 order_temp_id text NOT NULL, 685 customer_id int 4NOT NULL,685 customer_id int NOT NULL, 686 686 message text, 687 687 order_name01 text, … … 701 701 order_addr01 text, 702 702 order_addr02 text, 703 order_sex int2,703 order_sex smallint, 704 704 order_birth timestamp, 705 order_job int 4,705 order_job int, 706 706 deliv_name01 text, 707 707 deliv_name02 text, … … 729 729 total numeric, 730 730 payment_total numeric, 731 payment_id int 4,731 payment_id int, 732 732 payment_method text, 733 deliv_id int 4,734 deliv_time_id int 4,733 deliv_id int, 734 deliv_time_id int, 735 735 deliv_time text, 736 736 deliv_no text, 737 737 note text, 738 mail_flag int2,739 status int2,740 deliv_check int2,741 point_check int2,738 mail_flag smallint, 739 status smallint, 740 deliv_check smallint, 741 point_check smallint, 742 742 loan_result text, 743 743 credit_result text, … … 745 745 create_date timestamp NOT NULL DEFAULT now(), 746 746 update_date timestamp, 747 del_flg int2NOT NULL DEFAULT 0,747 del_flg smallint NOT NULL DEFAULT 0, 748 748 deliv_date text, 749 749 conveni_data text, … … 751 751 cell02 text, 752 752 cell03 text, 753 order_id int 4,753 order_id int, 754 754 memo01 text, 755 755 memo02 text, … … 767 767 CREATE TABLE dtb_other_deliv ( 768 768 other_deliv_id serial NOT NULL, 769 customer_id int 4NOT NULL,769 customer_id int NOT NULL, 770 770 name01 text, 771 771 name02 text, … … 784 784 785 785 CREATE TABLE dtb_order_detail ( 786 order_id int 4NOT NULL,787 product_id int 4NOT NULL,788 classcategory_id1 int 4NOT NULL,789 classcategory_id2 int 4NOT NULL,786 order_id int NOT NULL, 787 product_id int NOT NULL, 788 classcategory_id1 int NOT NULL, 789 classcategory_id2 int NOT NULL, 790 790 product_name text NOT NULL, 791 791 product_code text, … … 798 798 799 799 CREATE TABLE mtb_pref ( 800 pref_id int2NOT NULL,800 pref_id smallint NOT NULL, 801 801 pref_name text, 802 rank int2NOT NULL DEFAULT 0,802 rank smallint NOT NULL DEFAULT 0, 803 803 PRIMARY KEY (pref_id) 804 804 ); … … 810 810 login_id text NOT NULL, 811 811 password text NOT NULL, 812 authority int2NOT NULL,813 rank int 4NOT NULL DEFAULT 0,814 work int2NOT NULL DEFAULT 1,815 del_flg int2NOT NULL DEFAULT 0,816 creator_id int 4NOT NULL,812 authority smallint NOT NULL, 813 rank int NOT NULL DEFAULT 0, 814 work smallint NOT NULL DEFAULT 1, 815 del_flg smallint NOT NULL DEFAULT 0, 816 creator_id int NOT NULL, 817 817 update_date timestamp, 818 818 create_date timestamp NOT NULL DEFAULT now(), … … 826 826 question text, 827 827 create_date timestamp NOT NULL DEFAULT now(), 828 del_flg int2NOT NULL DEFAULT 0,828 del_flg smallint NOT NULL DEFAULT 0, 829 829 PRIMARY KEY (question_id) 830 830 ); … … 832 832 CREATE TABLE dtb_question_result ( 833 833 result_id serial NOT NULL, 834 question_id int 4NOT NULL,834 question_id int NOT NULL, 835 835 question_date timestamp, 836 836 question_name text, … … 841 841 zip01 text, 842 842 zip02 text, 843 pref int2,843 pref smallint, 844 844 addr01 text, 845 845 addr02 text, … … 855 855 question06 text, 856 856 create_date timestamp NOT NULL DEFAULT now(), 857 del_flg int2NOT NULL DEFAULT 0,857 del_flg smallint NOT NULL DEFAULT 0, 858 858 PRIMARY KEY (result_id) 859 859 ); 860 860 861 861 CREATE TABLE dtb_bat_relate_products ( 862 product_id int 4,863 relate_product_id int 4,864 customer_id int 4,862 product_id int, 863 relate_product_id int, 864 customer_id int, 865 865 create_date timestamp DEFAULT now() 866 866 ); … … 870 870 campaign_name text, 871 871 campaign_point_rate numeric NOT NULL, 872 campaign_point_type int2,872 campaign_point_type smallint, 873 873 start_date timestamp NOT NULL, 874 874 end_date timestamp NOT NULL, 875 875 directory_name text NOT NULL, 876 limit_count int 4NOT NULL DEFAULT 0,877 total_count int 4NOT NULL DEFAULT 0,878 orverlapping_flg int2NOT NULL DEFAULT 0,879 cart_flg int2NOT NULL DEFAULT 0,880 deliv_free_flg int2NOT NULL DEFAULT 0,876 limit_count int NOT NULL DEFAULT 0, 877 total_count int NOT NULL DEFAULT 0, 878 orverlapping_flg smallint NOT NULL DEFAULT 0, 879 cart_flg smallint NOT NULL DEFAULT 0, 880 deliv_free_flg smallint NOT NULL DEFAULT 0, 881 881 search_condition text, 882 del_flg int2NOT NULL DEFAULT 0,882 del_flg smallint NOT NULL DEFAULT 0, 883 883 create_date timestamp NOT NULL, 884 884 update_date timestamp NOT NULL DEFAULT now(), … … 887 887 888 888 CREATE TABLE dtb_campaign_detail ( 889 campaign_id int 4NOT NULL,890 product_id int 4NOT NULL,889 campaign_id int NOT NULL, 890 product_id int NOT NULL, 891 891 campaign_point_rate numeric NOT NULL 892 892 ); … … 899 899 tpl_dir text, 900 900 filename text, 901 header_chk int2DEFAULT 1,902 footer_chk int2DEFAULT 1,903 edit_flg int2DEFAULT 1,901 header_chk smallint DEFAULT 1, 902 footer_chk smallint DEFAULT 1, 903 edit_flg smallint DEFAULT 1, 904 904 author text, 905 905 description text, … … 919 919 update_date timestamp NOT NULL DEFAULT now(), 920 920 php_path text, 921 del_flg int2NOT NULL DEFAULT 0,921 del_flg smallint NOT NULL DEFAULT 0, 922 922 PRIMARY KEY (bloc_id) 923 923 ); 924 924 925 925 CREATE TABLE dtb_blocposition ( 926 page_id int 4NOT NULL,927 target_id int 4,928 bloc_id int 4,929 bloc_row int 4,926 page_id int NOT NULL, 927 target_id int, 928 bloc_id int, 929 bloc_row int, 930 930 filename text, 931 anywhere int2DEFAULT 0 NOT NULL931 anywhere smallint DEFAULT 0 NOT NULL 932 932 ); 933 933 934 934 CREATE TABLE dtb_csv ( 935 935 no serial, 936 csv_id int 4NOT NULL,936 csv_id int NOT NULL, 937 937 col text, 938 938 disp_name text, 939 rank int 4,940 status int2NOT NULL DEFAULT 1,939 rank int, 940 status smallint NOT NULL DEFAULT 1, 941 941 create_date timestamp NOT NULL DEFAULT now(), 942 942 update_date timestamp NOT NULL DEFAULT now(), … … 965 965 note text, 966 966 secret_key text NOT NULL UNIQUE, 967 status int2NOT NULL,968 del_flg int2DEFAULT 0,967 status smallint NOT NULL, 968 del_flg smallint DEFAULT 0, 969 969 create_date timestamp NOT NULL, 970 970 update_date timestamp NOT NULL DEFAULT now(), … … 973 973 974 974 create table dtb_templates ( 975 template_code textNOT NULL,976 template_name text,977 create_date timestamp NOT NULL defaultnow(),978 update_date timestamp NOT NULL defaultnow(),975 template_code text NOT NULL, 976 template_name text, 977 create_date timestamp NOT NULL DEFAULT now(), 978 update_date timestamp NOT NULL DEFAULT now(), 979 979 PRIMARY KEY (template_code) 980 980 ); 981 981 982 982 create table dtb_table_comment ( 983 id 984 table_name 985 column_name 986 description 983 id serial, 984 table_name text, 985 column_name text, 986 description text, 987 987 PRIMARY KEY (id) 988 988 ); … … 991 991 maker_id serial NOT NULL, 992 992 name text NOT NULL, 993 rank int 4NOT NULL DEFAULT 0,994 creator_id int 4NOT NULL,993 rank int NOT NULL DEFAULT 0, 994 creator_id int NOT NULL, 995 995 create_date timestamp NOT NULL DEFAULT now(), 996 996 update_date timestamp NOT NULL, 997 del_flg int2NOT NULL DEFAULT 0,997 del_flg smallint NOT NULL DEFAULT 0, 998 998 PRIMARY KEY (maker_id) 999 999 ); 1000 1000 1001 1001 CREATE TABLE dtb_maker_count ( 1002 maker_id int 4NOT NULL,1003 product_count int 4NOT NULL,1002 maker_id int NOT NULL, 1003 product_count int NOT NULL, 1004 1004 create_date timestamp NOT NULL DEFAULT Now() 1005 1005 ); … … 1008 1008 id text, 1009 1009 name text, 1010 rank int2NOT NULL DEFAULT 0,1010 rank smallint NOT NULL DEFAULT 0, 1011 1011 PRIMARY KEY (id) 1012 1012 ); 1013 1013 1014 1014 CREATE TABLE mtb_disable_logout ( 1015 id int2,1016 name text, 1017 rank int2NOT NULL DEFAULT 0,1015 id smallint, 1016 name text, 1017 rank smallint NOT NULL DEFAULT 0, 1018 1018 PRIMARY KEY (id) 1019 1019 ); 1020 1020 1021 1021 CREATE TABLE mtb_authority ( 1022 id int2,1023 name text, 1024 rank int2NOT NULL DEFAULT 0,1022 id smallint, 1023 name text, 1024 rank smallint NOT NULL DEFAULT 0, 1025 1025 PRIMARY KEY (id) 1026 1026 ); 1027 1027 1028 1028 CREATE TABLE mtb_work ( 1029 id int2,1030 name text, 1031 rank int2NOT NULL DEFAULT 0,1029 id smallint, 1030 name text, 1031 rank smallint NOT NULL DEFAULT 0, 1032 1032 PRIMARY KEY (id) 1033 1033 ); 1034 1034 1035 1035 CREATE TABLE mtb_disp ( 1036 id int2,1037 name text, 1038 rank int2NOT NULL DEFAULT 0,1036 id smallint, 1037 name text, 1038 rank smallint NOT NULL DEFAULT 0, 1039 1039 PRIMARY KEY (id) 1040 1040 ); 1041 1041 1042 1042 CREATE TABLE mtb_class ( 1043 id int2,1044 name text, 1045 rank int2NOT NULL DEFAULT 0,1043 id smallint, 1044 name text, 1045 rank smallint NOT NULL DEFAULT 0, 1046 1046 PRIMARY KEY (id) 1047 1047 ); 1048 1048 1049 1049 CREATE TABLE mtb_srank ( 1050 id int2,1051 name text, 1052 rank int2NOT NULL DEFAULT 0,1050 id smallint, 1051 name text, 1052 rank smallint NOT NULL DEFAULT 0, 1053 1053 PRIMARY KEY (id) 1054 1054 ); 1055 1055 1056 1056 CREATE TABLE mtb_status ( 1057 id int2,1058 name text, 1059 rank int2NOT NULL DEFAULT 0,1057 id smallint, 1058 name text, 1059 rank smallint NOT NULL DEFAULT 0, 1060 1060 PRIMARY KEY (id) 1061 1061 ); 1062 1062 1063 1063 CREATE TABLE mtb_status_image ( 1064 id int2,1065 name text, 1066 rank int2NOT NULL DEFAULT 0,1064 id smallint, 1065 name text, 1066 rank smallint NOT NULL DEFAULT 0, 1067 1067 PRIMARY KEY (id) 1068 1068 ); 1069 1069 1070 1070 CREATE TABLE mtb_allowed_tag ( 1071 id int2,1072 name text, 1073 rank int2NOT NULL DEFAULT 0,1071 id smallint, 1072 name text, 1073 rank smallint NOT NULL DEFAULT 0, 1074 1074 PRIMARY KEY (id) 1075 1075 ); 1076 1076 1077 1077 CREATE TABLE mtb_page_max ( 1078 id int2,1079 name text, 1080 rank int2NOT NULL DEFAULT 0,1078 id smallint, 1079 name text, 1080 rank smallint NOT NULL DEFAULT 0, 1081 1081 PRIMARY KEY (id) 1082 1082 ); 1083 1083 1084 1084 CREATE TABLE mtb_magazine_type ( 1085 id int2,1086 name text, 1087 rank int2NOT NULL DEFAULT 0,1085 id smallint, 1086 name text, 1087 rank smallint NOT NULL DEFAULT 0, 1088 1088 PRIMARY KEY (id) 1089 1089 ); 1090 1090 1091 1091 CREATE TABLE mtb_mail_magazine_type ( 1092 id int2,1093 name text, 1094 rank int2NOT NULL DEFAULT 0,1092 id smallint, 1093 name text, 1094 rank smallint NOT NULL DEFAULT 0, 1095 1095 PRIMARY KEY (id) 1096 1096 ); 1097 1097 1098 1098 CREATE TABLE mtb_recommend ( 1099 id int2,1100 name text, 1101 rank int2NOT NULL DEFAULT 0,1099 id smallint, 1100 name text, 1101 rank smallint NOT NULL DEFAULT 0, 1102 1102 PRIMARY KEY (id) 1103 1103 ); 1104 1104 1105 1105 CREATE TABLE mtb_taxrule ( 1106 id int2,1107 name text, 1108 rank int2NOT NULL DEFAULT 0,1106 id smallint, 1107 name text, 1108 rank smallint NOT NULL DEFAULT 0, 1109 1109 PRIMARY KEY (id) 1110 1110 ); 1111 1111 1112 1112 CREATE TABLE mtb_mail_template ( 1113 id int2,1114 name text, 1115 rank int2NOT NULL DEFAULT 0,1113 id smallint, 1114 name text, 1115 rank smallint NOT NULL DEFAULT 0, 1116 1116 PRIMARY KEY (id) 1117 1117 ); 1118 1118 1119 1119 CREATE TABLE mtb_mail_tpl_path ( 1120 id int2,1121 name text, 1122 rank int2NOT NULL DEFAULT 0,1120 id smallint, 1121 name text, 1122 rank smallint NOT NULL DEFAULT 0, 1123 1123 PRIMARY KEY (id) 1124 1124 ); 1125 1125 1126 1126 CREATE TABLE mtb_job ( 1127 id int2,1128 name text, 1129 rank int2NOT NULL DEFAULT 0,1127 id smallint, 1128 name text, 1129 rank smallint NOT NULL DEFAULT 0, 1130 1130 PRIMARY KEY (id) 1131 1131 ); 1132 1132 1133 1133 CREATE TABLE mtb_reminder ( 1134 id int2,1135 name text, 1136 rank int2NOT NULL DEFAULT 0,1134 id smallint, 1135 name text, 1136 rank smallint NOT NULL DEFAULT 0, 1137 1137 PRIMARY KEY (id) 1138 1138 ); 1139 1139 1140 1140 CREATE TABLE mtb_sex ( 1141 id int2,1142 name text, 1143 rank int2NOT NULL DEFAULT 0,1141 id smallint, 1142 name text, 1143 rank smallint NOT NULL DEFAULT 0, 1144 1144 PRIMARY KEY (id) 1145 1145 ); 1146 1146 1147 1147 CREATE TABLE mtb_page_rows ( 1148 id int2,1149 name text, 1150 rank int2NOT NULL DEFAULT 0,1148 id smallint, 1149 name text, 1150 rank smallint NOT NULL DEFAULT 0, 1151 1151 PRIMARY KEY (id) 1152 1152 ); 1153 1153 1154 1154 CREATE TABLE mtb_mail_type ( 1155 id int2,1156 name text, 1157 rank int2NOT NULL DEFAULT 0,1155 id smallint, 1156 name text, 1157 rank smallint NOT NULL DEFAULT 0, 1158 1158 PRIMARY KEY (id) 1159 1159 ); 1160 1160 1161 1161 CREATE TABLE mtb_order_status ( 1162 id int2,1163 name text, 1164 rank int2NOT NULL DEFAULT 0,1162 id smallint, 1163 name text, 1164 rank smallint NOT NULL DEFAULT 0, 1165 1165 PRIMARY KEY (id) 1166 1166 ); 1167 1167 1168 1168 CREATE TABLE mtb_product_status_color ( 1169 id int2,1170 name text, 1171 rank int2NOT NULL DEFAULT 0,1169 id smallint, 1170 name text, 1171 rank smallint NOT NULL DEFAULT 0, 1172 1172 PRIMARY KEY (id) 1173 1173 ); 1174 1174 1175 1175 CREATE TABLE mtb_order_status_color ( 1176 id int2,1177 name text, 1178 rank int2NOT NULL DEFAULT 0,1176 id smallint, 1177 name text, 1178 rank smallint NOT NULL DEFAULT 0, 1179 1179 PRIMARY KEY (id) 1180 1180 ); 1181 1181 1182 1182 CREATE TABLE mtb_wday ( 1183 id int2,1184 name text, 1185 rank int2NOT NULL DEFAULT 0,1183 id smallint, 1184 name text, 1185 rank smallint NOT NULL DEFAULT 0, 1186 1186 PRIMARY KEY (id) 1187 1187 ); 1188 1188 1189 1189 CREATE TABLE mtb_delivery_date ( 1190 id int2,1191 name text, 1192 rank int2NOT NULL DEFAULT 0,1190 id smallint, 1191 name text, 1192 rank smallint NOT NULL DEFAULT 0, 1193 1193 PRIMARY KEY (id) 1194 1194 ); 1195 1195 1196 1196 CREATE TABLE mtb_product_list_max ( 1197 id int2,1198 name text, 1199 rank int2NOT NULL DEFAULT 0,1197 id smallint, 1198 name text, 1199 rank smallint NOT NULL DEFAULT 0, 1200 1200 PRIMARY KEY (id) 1201 1201 ); 1202 1202 1203 1203 CREATE TABLE mtb_convenience ( 1204 id int2,1205 name text, 1206 rank int2NOT NULL DEFAULT 0,1204 id smallint, 1205 name text, 1206 rank smallint NOT NULL DEFAULT 0, 1207 1207 PRIMARY KEY (id) 1208 1208 ); 1209 1209 1210 1210 CREATE TABLE mtb_conveni_message ( 1211 id int2,1212 name text, 1213 rank int2NOT NULL DEFAULT 0,1211 id smallint, 1212 name text, 1213 rank smallint NOT NULL DEFAULT 0, 1214 1214 PRIMARY KEY (id) 1215 1215 ); 1216 1216 1217 1217 CREATE TABLE mtb_db ( 1218 id int2,1219 name text, 1220 rank int2NOT NULL DEFAULT 0,1218 id smallint, 1219 name text, 1220 rank smallint NOT NULL DEFAULT 0, 1221 1221 PRIMARY KEY (id) 1222 1222 ); 1223 1223 1224 1224 CREATE TABLE mtb_target ( 1225 id int2,1226 name text, 1227 rank int2NOT NULL DEFAULT 0,1225 id smallint, 1226 name text, 1227 rank smallint NOT NULL DEFAULT 0, 1228 1228 PRIMARY KEY (id) 1229 1229 ); 1230 1230 1231 1231 CREATE TABLE mtb_review_deny_url ( 1232 id int2,1233 name text, 1234 rank int2NOT NULL DEFAULT 0,1232 id smallint, 1233 name text, 1234 rank smallint NOT NULL DEFAULT 0, 1235 1235 PRIMARY KEY (id) 1236 1236 ); 1237 1237 1238 1238 CREATE TABLE mtb_track_back_status ( 1239 id int2,1240 name text, 1241 rank int2NOT NULL DEFAULT 0,1239 id smallint, 1240 name text, 1241 rank smallint NOT NULL DEFAULT 0, 1242 1242 PRIMARY KEY (id) 1243 1243 ); 1244 1244 1245 1245 CREATE TABLE mtb_site_control_track_back ( 1246 id int2,1247 name text, 1248 rank int2NOT NULL DEFAULT 0,1246 id smallint, 1247 name text, 1248 rank smallint NOT NULL DEFAULT 0, 1249 1249 PRIMARY KEY (id) 1250 1250 ); 1251 1251 1252 1252 CREATE TABLE mtb_site_control_affiliate ( 1253 id int2,1254 name text, 1255 rank int2NOT NULL DEFAULT 0,1253 id smallint, 1254 name text, 1255 rank smallint NOT NULL DEFAULT 0, 1256 1256 PRIMARY KEY (id) 1257 1257 ); 1258 1258 1259 1259 CREATE TABLE mtb_mobile_domain ( 1260 id int2,1261 name text, 1262 rank int2NOT NULL DEFAULT 0,1260 id smallint, 1261 name text, 1262 rank smallint NOT NULL DEFAULT 0, 1263 1263 PRIMARY KEY (id) 1264 1264 ); … … 1267 1267 id text, 1268 1268 name text, 1269 rank int2NOT NULL DEFAULT 0,1269 rank smallint NOT NULL DEFAULT 0, 1270 1270 PRIMARY KEY (id) 1271 1271 ); … … 1274 1274 id text, 1275 1275 name text, 1276 rank int2NOT NULL DEFAULT 0,1276 rank smallint NOT NULL DEFAULT 0, 1277 1277 PRIMARY KEY (id) 1278 1278 ); … … 1281 1281 id text, 1282 1282 name text, 1283 rank int2NOT NULL DEFAULT 0,1283 rank smallint NOT NULL DEFAULT 0, 1284 1284 remarks text, 1285 1285 PRIMARY KEY (id)
Note: See TracChangeset
for help on using the changeset viewer.