Changeset 21553
- Timestamp:
- 2012/02/26 23:54:20 (12 years ago)
- Location:
- branches/version-2_12-dev
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Query.php
r21544 r21553 79 79 } 80 80 $this->dbFactory = SC_DB_DBFactory_Ex::getInstance(); 81 $this->dbFactory->initObjQuery($this); 81 82 $this->force_run = $force_run; 82 83 } -
branches/version-2_12-dev/data/class/db/SC_DB_DBFactory.php
r21526 r21553 154 154 function sfGetCreateIndexDefinition($table, $name, $definition) { return $definition; } 155 155 156 /** 157 * 各 DB に応じた SC_Query での初期化を行う 158 * 159 * @param SC_Query $objQuery SC_Query インスタンス 160 * @return void 161 */ 162 function initObjQuery(SC_Query &$objQuery) { 163 } 156 164 } -
branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r21544 r21553 313 313 return 'FROM DUAL'; 314 314 } 315 316 /** 317 * 各 DB に応じた SC_Query での初期化を行う 318 * 319 * @param SC_Query $objQuery SC_Query インスタンス 320 * @return void 321 */ 322 function initObjQuery(SC_Query &$objQuery) { 323 $objQuery->exec('SET SESSION storage_engine = InnoDB'); 324 } 315 325 } -
branches/version-2_12-dev/html/install/sql/create_table_mysql.sql
r21512 r21553 1 1 create table dtb_module_update_logs( 2 log_id int 2 log_id int NOT NULL, 3 3 module_id int NOT NULL, 4 4 buckup_path text, … … 9 9 update_date timestamp NOT NULL, 10 10 PRIMARY KEY (log_id) 11 ) ENGINE=InnoDB;11 ); 12 12 13 13 CREATE TABLE dtb_ownersstore_settings ( 14 14 public_key text 15 ) ENGINE=InnoDB;15 ); 16 16 17 17 CREATE TABLE dtb_kiyaku ( 18 kiyaku_id int 18 kiyaku_id int NOT NULL, 19 19 kiyaku_title text NOT NULL, 20 20 kiyaku_text text NOT NULL, … … 25 25 del_flg smallint NOT NULL DEFAULT 0, 26 26 PRIMARY KEY (kiyaku_id) 27 ) ENGINE=InnoDB;27 ); 28 28 29 29 CREATE TABLE dtb_holiday ( 30 holiday_id int 30 holiday_id int NOT NULL, 31 31 title text NOT NULL, 32 32 month smallint NOT NULL, … … 38 38 del_flg smallint NOT NULL DEFAULT 0, 39 39 PRIMARY KEY (holiday_id) 40 ) ENGINE=InnoDB;40 ); 41 41 42 42 CREATE TABLE mtb_zip ( … … 45 45 city text, 46 46 town text 47 ) ENGINE=InnoDB;47 ); 48 48 49 49 CREATE TABLE dtb_update ( … … 63 63 release_date datetime NOT NULL, 64 64 PRIMARY KEY (module_id) 65 ) ENGINE=InnoDB;65 ); 66 66 67 67 CREATE TABLE dtb_baseinfo ( … … 130 130 downloadable_days numeric DEFAULT 30, 131 131 downloadable_days_unlimited smallint 132 ) ENGINE=InnoDB;132 ); 133 133 134 134 CREATE TABLE dtb_deliv ( 135 deliv_id int 135 deliv_id int NOT NULL, 136 136 product_type_id int, 137 137 name text, … … 146 146 update_date timestamp NOT NULL, 147 147 PRIMARY KEY (deliv_id) 148 ) ENGINE=InnoDB;148 ); 149 149 150 150 CREATE TABLE dtb_payment_options ( … … 153 153 rank int, 154 154 PRIMARY KEY (deliv_id, payment_id) 155 ) ENGINE=InnoDB;155 ); 156 156 157 157 CREATE TABLE dtb_delivtime ( … … 160 160 deliv_time text NOT NULL, 161 161 PRIMARY KEY (deliv_id, time_id) 162 ) ENGINE=InnoDB;162 ); 163 163 164 164 CREATE TABLE dtb_delivfee ( 165 165 deliv_id int NOT NULL, 166 fee_id int 166 fee_id int NOT NULL, 167 167 fee numeric NOT NULL, 168 168 pref smallint, 169 169 PRIMARY KEY (deliv_id, fee_id) 170 ) ENGINE=InnoDB;170 ); 171 171 172 172 CREATE TABLE dtb_payment ( 173 payment_id int 173 payment_id int NOT NULL, 174 174 payment_method text, 175 175 charge numeric, … … 201 201 memo10 text, 202 202 PRIMARY KEY (payment_id) 203 ) ENGINE=InnoDB;203 ); 204 204 205 205 CREATE TABLE dtb_mailtemplate ( … … 213 213 update_date timestamp NOT NULL, 214 214 PRIMARY KEY (template_id) 215 ) ENGINE=InnoDB;215 ); 216 216 217 217 CREATE TABLE dtb_mailmaga_template ( … … 225 225 update_date timestamp NOT NULL, 226 226 PRIMARY KEY (template_id) 227 ) ENGINE=InnoDB;227 ); 228 228 229 229 CREATE TABLE dtb_send_history ( 230 send_id int 230 send_id int NOT NULL, 231 231 mail_method smallint, 232 232 subject text, … … 242 242 update_date timestamp NOT NULL, 243 243 PRIMARY KEY (send_id) 244 ) ENGINE=InnoDB;244 ); 245 245 246 246 CREATE TABLE dtb_send_customer ( … … 251 251 send_flag smallint, 252 252 PRIMARY KEY (send_id, customer_id) 253 ) ENGINE=InnoDB;253 ); 254 254 255 255 CREATE TABLE dtb_products ( 256 product_id int 256 product_id int NOT NULL, 257 257 name text NOT NULL, 258 258 maker_id int, … … 300 300 deliv_date_id int, 301 301 PRIMARY KEY (product_id) 302 ) ENGINE=InnoDB;302 ); 303 303 304 304 CREATE TABLE dtb_products_class ( 305 product_class_id int 305 product_class_id int NOT NULL, 306 306 product_id int NOT NULL, 307 307 classcategory_id1 int NOT NULL DEFAULT 0, … … 322 322 down_realfilename text, 323 323 del_flg smallint NOT NULL DEFAULT 0, 324 PRIMARY KEY (product_class_id) 325 ) ENGINE=InnoDB; 324 PRIMARY KEY (product_class_id), 325 UNIQUE (product_id, classcategory_id1, classcategory_id2) 326 ); 326 327 327 328 CREATE TABLE dtb_class ( 328 class_id int 329 class_id int NOT NULL, 329 330 name text, 330 331 rank int, … … 334 335 del_flg smallint NOT NULL DEFAULT 0, 335 336 PRIMARY KEY (class_id) 336 ) ENGINE=InnoDB;337 ); 337 338 338 339 CREATE TABLE dtb_classcategory ( 339 classcategory_id int 340 classcategory_id int NOT NULL, 340 341 name text, 341 342 class_id int NOT NULL, … … 346 347 del_flg smallint NOT NULL DEFAULT 0, 347 348 PRIMARY KEY (classcategory_id) 348 ) ENGINE=InnoDB;349 ); 349 350 350 351 CREATE TABLE dtb_category ( 351 category_id int 352 category_id int NOT NULL, 352 353 category_name text, 353 354 parent_category_id int NOT NULL DEFAULT 0, … … 359 360 del_flg smallint NOT NULL DEFAULT 0, 360 361 PRIMARY KEY (category_id) 361 ) ENGINE=InnoDB;362 ); 362 363 363 364 CREATE TABLE dtb_product_categories ( … … 366 367 rank int NOT NULL, 367 368 PRIMARY KEY(product_id, category_id) 368 ) ENGINE=InnoDB;369 ); 369 370 370 371 CREATE TABLE dtb_product_status ( … … 375 376 update_date timestamp NOT NULL, 376 377 del_flg smallint NOT NULL DEFAULT 0, 377 PRIMARY KEY (product_status_id, product_id)378 ) ENGINE=InnoDB;378 PRIMARY KEY (product_status_id, product_id) 379 ); 379 380 380 381 CREATE TABLE dtb_recommend_products ( … … 387 388 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 388 389 update_date timestamp NOT NULL 389 ) ENGINE=InnoDB;390 ); 390 391 391 392 CREATE TABLE dtb_review ( 392 review_id int 393 review_id int NOT NULL, 393 394 product_id int NOT NULL, 394 395 reviewer_name text NOT NULL, … … 405 406 del_flg smallint NOT NULL DEFAULT 0, 406 407 PRIMARY KEY (review_id) 407 ) ENGINE=InnoDB;408 ); 408 409 409 410 CREATE TABLE dtb_customer_favorite_products ( … … 413 414 update_date timestamp NOT NULL, 414 415 PRIMARY KEY (customer_id, product_id) 415 ) ENGINE=InnoDB;416 ); 416 417 417 418 CREATE TABLE dtb_category_count ( … … 419 420 product_count int NOT NULL, 420 421 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 421 ) ENGINE=InnoDB;422 ); 422 423 423 424 CREATE TABLE dtb_category_total_count ( … … 425 426 product_count int, 426 427 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 427 ) ENGINE=InnoDB;428 ); 428 429 429 430 CREATE TABLE dtb_news ( 430 news_id int 431 news_id int NOT NULL, 431 432 news_date datetime, 432 433 rank int, … … 441 442 del_flg smallint NOT NULL DEFAULT 0, 442 443 PRIMARY KEY (news_id) 443 ) ENGINE=InnoDB;444 ); 444 445 445 446 CREATE TABLE dtb_best_products ( 446 best_id int 447 best_id int NOT NULL, 447 448 category_id int NOT NULL, 448 449 rank int NOT NULL DEFAULT 0, … … 455 456 del_flg smallint NOT NULL DEFAULT 0, 456 457 PRIMARY KEY (best_id) 457 ) ENGINE=InnoDB;458 ); 458 459 459 460 CREATE TABLE dtb_mail_history ( 460 send_id int 461 send_id int NOT NULL, 461 462 order_id int NOT NULL, 462 463 send_date datetime, … … 466 467 mail_body text, 467 468 PRIMARY KEY (send_id) 468 ) ENGINE=InnoDB;469 ); 469 470 470 471 CREATE TABLE dtb_customer ( 471 customer_id int 472 customer_id int NOT NULL, 472 473 name01 text NOT NULL, 473 474 name02 text NOT NULL, … … 494 495 reminder_answer text, 495 496 salt text, 496 secret_key varchar(50) NOT NULL UNIQUE,497 secret_key text NOT NULL, 497 498 first_buy_date datetime, 498 499 last_buy_date datetime, … … 507 508 mobile_phone_id text, 508 509 mailmaga_flg smallint, 509 PRIMARY KEY (customer_id) 510 ) ENGINE=InnoDB; 510 PRIMARY KEY (customer_id), 511 UNIQUE (secret_key(255)) 512 ); 511 513 512 514 CREATE TABLE dtb_order ( 513 order_id int 515 order_id int NOT NULL, 514 516 order_temp_id text, 515 517 customer_id int NOT NULL, … … 566 568 memo10 text, 567 569 PRIMARY KEY (order_id) 568 ) ENGINE=InnoDB;570 ); 569 571 570 572 CREATE TABLE dtb_order_temp ( … … 625 627 memo10 text, 626 628 session text 627 ) ENGINE=InnoDB;629 ); 628 630 629 631 CREATE TABLE dtb_shipping ( … … 645 647 shipping_addr01 text, 646 648 shipping_addr02 text, 647 deliv_id int NOT NULL,648 649 time_id int, 649 650 shipping_time text, … … 656 657 del_flg smallint NOT NULL DEFAULT 0, 657 658 PRIMARY KEY (shipping_id, order_id) 658 ) ENGINE=InnoDB;659 ); 659 660 660 661 CREATE TABLE dtb_shipment_item ( … … 669 670 quantity numeric, 670 671 PRIMARY KEY (shipping_id, product_class_id, order_id) 671 ) ENGINE=InnoDB;672 ); 672 673 673 674 CREATE TABLE dtb_other_deliv ( 674 other_deliv_id int 675 other_deliv_id int NOT NULL, 675 676 customer_id int NOT NULL, 676 677 name01 text, … … 687 688 tel03 text, 688 689 PRIMARY KEY (other_deliv_id) 689 ) ENGINE=InnoDB;690 ); 690 691 691 692 CREATE TABLE dtb_order_detail ( … … 702 703 point_rate numeric, 703 704 PRIMARY KEY (order_detail_id) 704 ) ENGINE=InnoDB;705 ); 705 706 706 707 CREATE TABLE dtb_member ( 707 member_id int 708 member_id int NOT NULL, 708 709 name text, 709 710 department text, … … 720 721 login_date datetime, 721 722 PRIMARY KEY (member_id) 722 ) ENGINE=InnoDB;723 ); 723 724 724 725 CREATE TABLE dtb_pagelayout ( 725 726 device_type_id int NOT NULL, 726 page_id int 727 page_id int NOT NULL, 727 728 page_name text, 728 729 url text NOT NULL, … … 738 739 update_date timestamp NOT NULL, 739 740 PRIMARY KEY (device_type_id, page_id) 740 ) ENGINE=InnoDB;741 ); 741 742 742 743 CREATE TABLE dtb_bloc ( 743 744 device_type_id int NOT NULL, 744 bloc_id int 745 bloc_id int NOT NULL, 745 746 bloc_name text, 746 747 tpl_path text, 747 filename varchar(50)NOT NULL,748 filename text NOT NULL, 748 749 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 749 750 update_date timestamp NOT NULL, … … 751 752 deletable_flg smallint NOT NULL DEFAULT 1, 752 753 PRIMARY KEY (device_type_id, bloc_id), 753 UNIQUE (device_type_id, filename )754 ) ENGINE=InnoDB;754 UNIQUE (device_type_id, filename(255)) 755 ); 755 756 756 757 CREATE TABLE dtb_blocposition ( … … 762 763 anywhere smallint DEFAULT 0 NOT NULL, 763 764 PRIMARY KEY (device_type_id, page_id, target_id, bloc_id) 764 ) ENGINE=InnoDB;765 ); 765 766 766 767 CREATE TABLE dtb_csv ( … … 778 779 error_check_types text, 779 780 PRIMARY KEY (no) 780 ) ENGINE=InnoDB;781 ); 781 782 782 783 CREATE TABLE dtb_csv_sql ( … … 787 788 update_date timestamp NOT NULL, 788 789 PRIMARY KEY (sql_id) 789 ) ENGINE=InnoDB;790 ); 790 791 791 792 CREATE TABLE dtb_templates ( 792 template_code varchar(50)NOT NULL,793 template_code text NOT NULL, 793 794 device_type_id int NOT NULL, 794 795 template_name text, 795 796 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 796 797 update_date timestamp NOT NULL, 797 PRIMARY KEY (template_code )798 ) ENGINE=InnoDB;798 PRIMARY KEY (template_code(255)) 799 ); 799 800 800 801 CREATE TABLE dtb_maker ( … … 807 808 del_flg smallint NOT NULL DEFAULT 0, 808 809 PRIMARY KEY (maker_id) 809 ) ENGINE=InnoDB;810 ); 810 811 811 812 CREATE TABLE dtb_maker_count ( … … 813 814 product_count int NOT NULL, 814 815 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 815 ) ENGINE=InnoDB;816 ); 816 817 817 818 CREATE TABLE mtb_pref ( … … 820 821 rank smallint NOT NULL DEFAULT 0, 821 822 PRIMARY KEY (id) 822 ) ENGINE=InnoDB;823 ); 823 824 824 825 CREATE TABLE mtb_permission ( … … 826 827 name text, 827 828 rank smallint NOT NULL DEFAULT 0, 828 PRIMARY KEY (id( 32))829 ) ENGINE=InnoDB;829 PRIMARY KEY (id(255)) 830 ); 830 831 831 832 CREATE TABLE mtb_disable_logout ( … … 834 835 rank smallint NOT NULL DEFAULT 0, 835 836 PRIMARY KEY (id) 836 ) ENGINE=InnoDB;837 ); 837 838 838 839 CREATE TABLE mtb_authority ( … … 841 842 rank smallint NOT NULL DEFAULT 0, 842 843 PRIMARY KEY (id) 843 ) ENGINE=InnoDB;844 ); 844 845 845 846 CREATE TABLE mtb_auth_excludes ( … … 848 849 rank smallint NOT NULL DEFAULT 0, 849 850 PRIMARY KEY (id) 850 ) ENGINE=InnoDB;851 ); 851 852 852 853 CREATE TABLE mtb_work ( … … 855 856 rank smallint NOT NULL DEFAULT 0, 856 857 PRIMARY KEY (id) 857 ) ENGINE=InnoDB;858 ); 858 859 859 860 CREATE TABLE mtb_disp ( … … 862 863 rank smallint NOT NULL DEFAULT 0, 863 864 PRIMARY KEY (id) 864 ) ENGINE=InnoDB;865 ); 865 866 866 867 CREATE TABLE mtb_class ( … … 869 870 rank smallint NOT NULL DEFAULT 0, 870 871 PRIMARY KEY (id) 871 ) ENGINE=InnoDB;872 ); 872 873 873 874 CREATE TABLE mtb_status ( … … 876 877 rank smallint NOT NULL DEFAULT 0, 877 878 PRIMARY KEY (id) 878 ) ENGINE=InnoDB;879 ); 879 880 880 881 CREATE TABLE mtb_status_image ( … … 883 884 rank smallint NOT NULL DEFAULT 0, 884 885 PRIMARY KEY (id) 885 ) ENGINE=InnoDB;886 ); 886 887 887 888 CREATE TABLE mtb_allowed_tag ( … … 890 891 rank smallint NOT NULL DEFAULT 0, 891 892 PRIMARY KEY (id) 892 ) ENGINE=InnoDB;893 ); 893 894 894 895 CREATE TABLE mtb_page_max ( … … 897 898 rank smallint NOT NULL DEFAULT 0, 898 899 PRIMARY KEY (id) 899 ) ENGINE=InnoDB;900 ); 900 901 901 902 CREATE TABLE mtb_magazine_type ( … … 904 905 rank smallint NOT NULL DEFAULT 0, 905 906 PRIMARY KEY (id) 906 ) ENGINE=InnoDB;907 ); 907 908 908 909 CREATE TABLE mtb_mail_magazine_type ( … … 911 912 rank smallint NOT NULL DEFAULT 0, 912 913 PRIMARY KEY (id) 913 ) ENGINE=InnoDB;914 ); 914 915 915 916 CREATE TABLE mtb_recommend ( … … 918 919 rank smallint NOT NULL DEFAULT 0, 919 920 PRIMARY KEY (id) 920 ) ENGINE=InnoDB;921 ); 921 922 922 923 CREATE TABLE mtb_taxrule ( … … 925 926 rank smallint NOT NULL DEFAULT 0, 926 927 PRIMARY KEY (id) 927 ) ENGINE=InnoDB;928 ); 928 929 929 930 CREATE TABLE mtb_mail_template ( … … 932 933 rank smallint NOT NULL DEFAULT 0, 933 934 PRIMARY KEY (id) 934 ) ENGINE=InnoDB;935 ); 935 936 936 937 CREATE TABLE mtb_mail_tpl_path ( … … 939 940 rank smallint NOT NULL DEFAULT 0, 940 941 PRIMARY KEY (id) 941 ) ENGINE=InnoDB;942 ); 942 943 943 944 CREATE TABLE mtb_job ( … … 946 947 rank smallint NOT NULL DEFAULT 0, 947 948 PRIMARY KEY (id) 948 ) ENGINE=InnoDB;949 ); 949 950 950 951 CREATE TABLE mtb_reminder ( … … 953 954 rank smallint NOT NULL DEFAULT 0, 954 955 PRIMARY KEY (id) 955 ) ENGINE=InnoDB;956 ); 956 957 957 958 CREATE TABLE mtb_sex ( … … 960 961 rank smallint NOT NULL DEFAULT 0, 961 962 PRIMARY KEY (id) 962 ) ENGINE=InnoDB;963 ); 963 964 964 965 CREATE TABLE mtb_customer_status ( … … 967 968 rank smallint NOT NULL DEFAULT 0, 968 969 PRIMARY KEY (id) 969 ) ENGINE=InnoDB;970 ); 970 971 971 972 CREATE TABLE mtb_mail_type ( … … 974 975 rank smallint NOT NULL DEFAULT 0, 975 976 PRIMARY KEY (id) 976 ) ENGINE=InnoDB;977 ); 977 978 978 979 CREATE TABLE mtb_order_status ( … … 981 982 rank smallint NOT NULL DEFAULT 0, 982 983 PRIMARY KEY (id) 983 ) ENGINE=InnoDB;984 ); 984 985 985 986 CREATE TABLE mtb_product_status_color ( … … 988 989 rank smallint NOT NULL DEFAULT 0, 989 990 PRIMARY KEY (id) 990 ) ENGINE=InnoDB;991 ); 991 992 992 993 CREATE TABLE mtb_order_status_color ( … … 995 996 rank smallint NOT NULL DEFAULT 0, 996 997 PRIMARY KEY (id) 997 ) ENGINE=InnoDB;998 ); 998 999 999 1000 CREATE TABLE mtb_wday ( … … 1002 1003 rank smallint NOT NULL DEFAULT 0, 1003 1004 PRIMARY KEY (id) 1004 ) ENGINE=InnoDB;1005 ); 1005 1006 1006 1007 CREATE TABLE mtb_delivery_date ( … … 1009 1010 rank smallint NOT NULL DEFAULT 0, 1010 1011 PRIMARY KEY (id) 1011 ) ENGINE=InnoDB;1012 ); 1012 1013 1013 1014 CREATE TABLE mtb_product_list_max ( … … 1016 1017 rank smallint NOT NULL DEFAULT 0, 1017 1018 PRIMARY KEY (id) 1018 ) ENGINE=InnoDB;1019 ); 1019 1020 1020 1021 CREATE TABLE mtb_db ( … … 1023 1024 rank smallint NOT NULL DEFAULT 0, 1024 1025 PRIMARY KEY (id) 1025 ) ENGINE=InnoDB;1026 ); 1026 1027 1027 1028 CREATE TABLE mtb_target ( … … 1030 1031 rank smallint NOT NULL DEFAULT 0, 1031 1032 PRIMARY KEY (id) 1032 ) ENGINE=InnoDB;1033 ); 1033 1034 1034 1035 CREATE TABLE mtb_review_deny_url ( … … 1037 1038 rank smallint NOT NULL DEFAULT 0, 1038 1039 PRIMARY KEY (id) 1039 ) ENGINE=InnoDB;1040 ); 1040 1041 1041 1042 CREATE TABLE mtb_mobile_domain ( … … 1044 1045 rank smallint NOT NULL DEFAULT 0, 1045 1046 PRIMARY KEY (id) 1046 ) ENGINE=InnoDB;1047 ); 1047 1048 1048 1049 CREATE TABLE mtb_ownersstore_err ( … … 1051 1052 rank smallint NOT NULL DEFAULT 0, 1052 1053 PRIMARY KEY (id) 1053 ) ENGINE=InnoDB;1054 ); 1054 1055 1055 1056 CREATE TABLE mtb_ownersstore_ips ( … … 1058 1059 rank smallint NOT NULL DEFAULT 0, 1059 1060 PRIMARY KEY (id) 1060 ) ENGINE=InnoDB;1061 ); 1061 1062 1062 1063 CREATE TABLE mtb_constants ( … … 1065 1066 rank smallint NOT NULL DEFAULT 0, 1066 1067 remarks text, 1067 PRIMARY KEY (id( 64))1068 ) ENGINE=InnoDB;1068 PRIMARY KEY (id(255)) 1069 ); 1069 1070 1070 1071 CREATE TABLE mtb_product_type ( … … 1073 1074 rank smallint NOT NULL, 1074 1075 PRIMARY KEY (id) 1075 ) ENGINE=InnoDB;1076 ); 1076 1077 1077 1078 CREATE TABLE mtb_device_type ( … … 1080 1081 rank smallint NOT NULL, 1081 1082 PRIMARY KEY (id) 1082 ) ENGINE=InnoDB;1083 ); 1083 1084 1084 1085 CREATE TABLE dtb_mobile_ext_session_id ( … … 1088 1089 url text, 1089 1090 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 1090 ) ENGINE=InnoDB;1091 ); 1091 1092 1092 1093 CREATE TABLE dtb_module ( … … 1099 1100 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1100 1101 update_date timestamp NOT NULL 1101 ) ENGINE=InnoDB;1102 ); 1102 1103 1103 1104 CREATE TABLE dtb_session ( 1104 sess_id varchar(50)NOT NULL,1105 sess_id text NOT NULL, 1105 1106 sess_data text, 1106 1107 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1107 1108 update_date timestamp NOT NULL, 1108 PRIMARY KEY (sess_id )1109 ) ENGINE=InnoDB;1109 PRIMARY KEY (sess_id(255)) 1110 ); 1110 1111 1111 1112 CREATE TABLE dtb_bkup ( 1112 bkup_name varchar(50),1113 bkup_name text, 1113 1114 bkup_memo text, 1114 1115 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1115 PRIMARY KEY (bkup_name )1116 ) ENGINE=InnoDB;1116 PRIMARY KEY (bkup_name(255)) 1117 ); 1117 1118 1118 1119 CREATE TABLE dtb_plugin ( 1119 1120 plugin_id int NOT NULL, 1120 plugin_name varchar(255)NOT NULL,1121 plugin_code varchar(255)NOT NULL,1122 author varchar(255),1123 author_site_url varchar(255),1124 plugin_site_url varchar(255),1125 plugin_version varchar(255),1126 compliant_version varchar(255),1127 plugin_description varchar(255),1121 plugin_name text NOT NULL, 1122 plugin_code text NOT NULL, 1123 author text, 1124 author_site_url text, 1125 plugin_site_url text, 1126 plugin_version text, 1127 compliant_version text, 1128 plugin_description text, 1128 1129 priority int NOT NULL DEFAULT 0, 1129 1130 enable smallint NOT NULL DEFAULT 0, … … 1131 1132 update_date timestamp NOT NULL, 1132 1133 PRIMARY KEY (plugin_id) 1133 ) ENGINE=InnoDB;1134 ); 1134 1135 1135 1136 CREATE TABLE dtb_plugin_hookpoint ( 1136 1137 id int NOT NULL, 1137 1138 plugin_id int NOT NULL, 1138 hook_point varchar(255) NOT NULL, 1139 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1140 update_date timestamp NOT NULL, 1141 PRIMARY KEY (id) 1142 ) ENGINE=InnoDB; 1143 1144 CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64)); 1139 hook_point text NOT NULL, 1140 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1141 update_date timestamp NOT NULL, 1142 PRIMARY KEY (id) 1143 ); 1144 1145 CREATE TABLE dtb_index_list ( 1146 table_name text NOT NULL, 1147 column_name text NOT NULL, 1148 recommend_flg smallint NOT NULL DEFAULT 0, 1149 recommend_comment text, 1150 PRIMARY KEY (table_name(255), column_name(255)) 1151 ); 1152 1153 1154 CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(255)); 1145 1155 CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id); 1146 1156 CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id); 1147 1157 CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id); 1148 CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key( 64));1149 CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value( 64));1150 CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url( 64));1158 CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(255)); 1159 CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(255)); 1160 CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(255)); 1151 1161 CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date); 1152 1153 CREATE TABLE dtb_index_list (1154 table_name varchar(30) NOT NULL,1155 column_name varchar(30) NOT NULL,1156 recommend_flg smallint NOT NULL DEFAULT 0,1157 recommend_comment text,1158 PRIMARY KEY (table_name, column_name)1159 ) ENGINE=InnoDB; -
branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql
r21512 r21553 149 149 150 150 CREATE TABLE dtb_payment_options ( 151 deliv_id int NOT NULL, 151 152 payment_id int NOT NULL, 152 deliv_id int NOT NULL,153 153 rank int, 154 PRIMARY KEY ( payment_id, deliv_id)154 PRIMARY KEY (deliv_id, payment_id) 155 155 ); 156 156 … … 322 322 down_realfilename text, 323 323 del_flg smallint NOT NULL DEFAULT 0, 324 PRIMARY KEY (product_class_id) 324 PRIMARY KEY (product_class_id), 325 UNIQUE (product_id, classcategory_id1, classcategory_id2) 325 326 ); 326 327 … … 494 495 reminder_answer text, 495 496 salt text, 496 secret_key text NOT NULL UNIQUE,497 secret_key text NOT NULL, 497 498 first_buy_date timestamp, 498 499 last_buy_date timestamp, … … 507 508 mobile_phone_id text, 508 509 mailmaga_flg smallint, 509 PRIMARY KEY (customer_id) 510 PRIMARY KEY (customer_id), 511 UNIQUE (secret_key) 510 512 ); 511 513 … … 645 647 shipping_addr01 text, 646 648 shipping_addr02 text, 647 deliv_id int NOT NULL,648 649 time_id int, 649 650 shipping_time text, … … 757 758 device_type_id int NOT NULL, 758 759 page_id int NOT NULL, 759 target_id int ,760 bloc_id int ,760 target_id int NOT NULL, 761 bloc_id int NOT NULL, 761 762 bloc_row int, 762 763 anywhere smallint DEFAULT 0 NOT NULL, … … 1110 1111 1111 1112 CREATE TABLE dtb_bkup ( 1112 bkup_name 1113 bkup_memo 1113 bkup_name text, 1114 bkup_memo text, 1114 1115 create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 1115 1116 PRIMARY KEY (bkup_name) … … 1124 1125 plugin_site_url text, 1125 1126 plugin_version text, 1126 compliant_version text, 1127 compliant_version text, 1127 1128 plugin_description text, 1128 1129 priority int NOT NULL DEFAULT 0, … … 1140 1141 update_date timestamp NOT NULL, 1141 1142 PRIMARY KEY (plugin_id) 1143 ); 1144 1145 CREATE TABLE dtb_index_list ( 1146 table_name text NOT NULL, 1147 column_name text NOT NULL, 1148 recommend_flg smallint NOT NULL DEFAULT 0, 1149 recommend_comment text, 1150 PRIMARY KEY (table_name, column_name) 1142 1151 ); 1143 1152 … … 1151 1160 CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url); 1152 1161 CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date); 1153 1154 CREATE TABLE dtb_index_list (1155 table_name text NOT NULL,1156 column_name text NOT NULL,1157 recommend_flg smallint NOT NULL DEFAULT 0,1158 recommend_comment text,1159 PRIMARY KEY (table_name, column_name)1160 );
Note: See TracChangeset
for help on using the changeset viewer.