Changeset 17490 for branches/comu-ver2/html
- Timestamp:
- 2008/08/04 00:47:07 (16 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
r17306 r17490 22 22 create_date datetime NOT NULL , 23 23 update_date datetime NOT NULL, 24 del_flg 24 del_flg smallint NOT NULL DEFAULT 0 25 25 ) TYPE=InnoDB ; 26 26 … … 34 34 create_date datetime NOT NULL, 35 35 update_date datetime NOT NULL, 36 del_flg 36 del_flg smallint NOT NULL DEFAULT 0 37 37 ) TYPE=InnoDB ; 38 38 … … 67 67 68 68 CREATE TABLE dtb_update ( 69 module_id int NOT NULL UNIQUE,69 module_id int NOT NULL, 70 70 module_name text NOT NULL, 71 71 now_version text, … … 80 80 create_date datetime NOT NULL , 81 81 update_date datetime, 82 release_date datetime NOT NULL 82 release_date datetime NOT NULL, 83 PRIMARY KEY (module_id) 83 84 ) TYPE=InnoDB ; 84 85 … … 215 216 216 217 CREATE TABLE dtb_mailmaga_template ( 217 template_id int auto_increment primary key NOT NULL UNIQUE,218 template_id int auto_increment primary key NOT NULL, 218 219 subject text, 219 220 charge_image text, … … 269 270 270 271 CREATE TABLE dtb_products ( 271 product_id int auto_increment primary key NOT NULL UNIQUE,272 product_id int auto_increment primary key NOT NULL, 272 273 name text, 273 274 deliv_fee numeric, … … 330 331 331 332 CREATE TABLE dtb_products_class ( 332 product_class_id int auto_increment primary key NOT NULL UNIQUE,333 product_class_id int auto_increment primary key NOT NULL, 333 334 product_id int NOT NULL, 334 335 classcategory_id1 int NOT NULL DEFAULT 0, … … 354 355 create_date datetime NOT NULL , 355 356 update_date datetime, 356 del_flg 357 del_flg smallint NOT NULL DEFAULT 0, 357 358 product_id int 358 359 ) TYPE=InnoDB ; … … 367 368 create_date datetime NOT NULL , 368 369 update_date datetime, 369 del_flg 370 del_flg smallint NOT NULL DEFAULT 0 370 371 ) TYPE=InnoDB ; 371 372 … … 379 380 create_date datetime NOT NULL , 380 381 update_date datetime, 381 del_flg 382 del_flg smallint NOT NULL DEFAULT 0 382 383 ) TYPE=InnoDB ; 383 384 … … 455 456 create_date datetime, 456 457 update_date datetime, 457 del_flg 458 del_flg smallint NOT NULL DEFAULT 0 458 459 ) TYPE=InnoDB ; 459 460 … … 485 486 486 487 CREATE TABLE dtb_news ( 487 news_id int auto_increment primary key NOT NULL UNIQUE,488 news_id int auto_increment primary key NOT NULL, 488 489 news_date datetime, 489 490 rank int, … … 496 497 create_date datetime NOT NULL , 497 498 update_date datetime, 498 del_flg 499 del_flg smallint NOT NULL DEFAULT 0 499 500 ) TYPE=InnoDB ; 500 501 … … 509 510 create_date datetime NOT NULL , 510 511 update_date datetime, 511 del_flg 512 del_flg smallint NOT NULL DEFAULT 0 512 513 ) TYPE=InnoDB ; 513 514 … … 557 558 create_date datetime NOT NULL , 558 559 update_date datetime , 559 del_flg 560 del_flg smallint NOT NULL DEFAULT 0, 560 561 cell01 text, 561 562 cell02 text, … … 570 571 email varchar(50) NOT NULL UNIQUE, 571 572 mail_flag smallint, 572 temp_id varchar(50) NOT NULL UNIQUE,573 temp_id varchar(50) NOT NULL, 573 574 end_flag smallint, 574 update_date datetime NOT NULL , 575 create_data datetime NOT NULL 575 update_date datetime NOT NULL, 576 create_data datetime NOT NULL, 577 PRIMARY KEY (temp_id) 576 578 ) TYPE=InnoDB ; 577 579 … … 639 641 update_date datetime, 640 642 commit_date datetime, 641 del_flg 643 del_flg smallint NOT NULL DEFAULT 0, 642 644 deliv_date text, 643 645 conveni_data text, … … 722 724 create_date datetime NOT NULL , 723 725 update_date datetime, 724 del_flg 726 del_flg smallint NOT NULL DEFAULT 0, 725 727 deliv_date text, 726 728 conveni_data text, … … 774 776 775 777 CREATE TABLE mtb_pref ( 776 pref_id smallint NOT NULL,778 pref_id smallint primary key NOT NULL, 777 779 pref_name text, 778 780 rank smallint NOT NULL DEFAULT 0 … … 800 802 question text, 801 803 create_date datetime NOT NULL , 802 del_flg 804 del_flg smallint NOT NULL DEFAULT 0 803 805 ) TYPE=InnoDB ; 804 806 … … 828 830 question06 text, 829 831 create_date datetime NOT NULL , 830 del_flg 832 del_flg smallint NOT NULL DEFAULT 0 831 833 ) TYPE=InnoDB ; 832 834 … … 939 941 CREATE TABLE dtb_templates 940 942 ( 941 template_code varchar(50) NOT NULL UNIQUE,943 template_code varchar(50) primary key NOT NULL, 942 944 template_name text , 943 945 create_date datetime NOT NULL , … … 960 962 create_date datetime NOT NULL, 961 963 update_date datetime NOT NULL, 962 del_flg 964 del_flg smallint NOT NULL DEFAULT 0 963 965 ) TYPE=InnoDB ; 964 966 -
branches/comu-ver2/html/install/sql/create_table_pgsql.sql
r17306 r17490 7 7 ok text, 8 8 create_date timestamp NOT NULL DEFAULT now(), 9 update_date timestamp NOT NULL DEFAULT now() 9 update_date timestamp NOT NULL DEFAULT now(), 10 PRIMARY KEY (log_id) 10 11 ); 11 12 … … 22 23 create_date timestamp NOT NULL DEFAULT now(), 23 24 update_date timestamp NOT NULL, 24 del_flg int2 NOT NULL DEFAULT 0 25 del_flg int2 NOT NULL DEFAULT 0, 26 PRIMARY KEY (kiyaku_id) 25 27 ); 26 28 … … 34 36 create_date timestamp NOT NULL DEFAULT now(), 35 37 update_date timestamp NOT NULL, 36 del_flg int2 NOT NULL DEFAULT 0 38 del_flg int2 NOT NULL DEFAULT 0, 39 PRIMARY KEY (holiday_id) 37 40 ); 38 41 … … 67 70 68 71 CREATE TABLE dtb_update ( 69 module_id int4 NOT NULL UNIQUE,72 module_id int4 NOT NULL, 70 73 module_name text NOT NULL, 71 74 now_version text, … … 80 83 create_date timestamp NOT NULL DEFAULT now(), 81 84 update_date timestamp, 82 release_date timestamp NOT NULL 85 release_date timestamp NOT NULL, 86 PRIMARY KEY (module_id) 83 87 ); 84 88 … … 154 158 creator_id int4 NOT NULL, 155 159 create_date timestamp NOT NULL DEFAULT now(), 156 update_date timestamp 160 update_date timestamp, 161 PRIMARY KEY (deliv_id) 157 162 ); 158 163 … … 160 165 deliv_id int4 NOT NULL, 161 166 time_id serial NOT NULL, 162 deliv_time text NOT NULL 167 deliv_time text NOT NULL, 168 PRIMARY KEY (time_id) 163 169 ); 164 170 … … 167 173 fee_id serial NOT NULL, 168 174 fee text NOT NULL, 169 pref int2 175 pref int2, 176 PRIMARY KEY (fee_id) 170 177 ); 171 178 … … 200 207 memo08 text, 201 208 memo09 text, 202 memo10 text 209 memo10 text, 210 PRIMARY KEY (payment_id) 203 211 ); 204 212 … … 215 223 216 224 CREATE TABLE dtb_mailmaga_template ( 217 template_id serial NOT NULL UNIQUE,225 template_id serial NOT NULL, 218 226 subject text, 219 227 charge_image text, … … 241 249 creator_id int4 NOT NULL, 242 250 create_date timestamp NOT NULL DEFAULT now(), 243 update_date timestamp 251 update_date timestamp, 252 PRIMARY KEY (template_id) 244 253 ); 245 254 … … 257 266 creator_id int4 NOT NULL, 258 267 create_date timestamp NOT NULL DEFAULT now(), 259 update_date timestamp NOT NULL DEFAULT now() 268 update_date timestamp NOT NULL DEFAULT now(), 269 PRIMARY KEY (send_id) 260 270 ); 261 271 … … 269 279 270 280 CREATE TABLE dtb_products ( 271 product_id serial NOT NULL UNIQUE,281 product_id serial NOT NULL, 272 282 name text, 273 283 deliv_fee numeric, … … 326 336 create_date timestamp NOT NULL DEFAULT now(), 327 337 update_date timestamp, 328 deliv_date_id int4 338 deliv_date_id int4, 339 PRIMARY KEY (product_id) 329 340 ); 330 341 331 342 CREATE TABLE dtb_products_class ( 332 product_class_id serial NOT NULL UNIQUE,343 product_class_id serial NOT NULL, 333 344 product_id int4 NOT NULL, 334 345 classcategory_id1 int4 NOT NULL DEFAULT 0, … … 343 354 creator_id int4 NOT NULL, 344 355 create_date timestamp NOT NULL DEFAULT now(), 345 update_date timestamp 356 update_date timestamp, 357 PRIMARY KEY (product_class_id) 346 358 ); 347 359 … … 354 366 create_date timestamp NOT NULL DEFAULT now(), 355 367 update_date timestamp, 356 del_flg int2 NOT NULL DEFAULT 0, 357 product_id int4 368 del_flg int2 NOT NULL DEFAULT 0, 369 product_id int4, 370 PRIMARY KEY (class_id) 358 371 ); 359 372 … … 367 380 create_date timestamp NOT NULL DEFAULT now(), 368 381 update_date timestamp, 369 del_flg int2 NOT NULL DEFAULT 0 382 del_flg int2 NOT NULL DEFAULT 0, 383 PRIMARY KEY (classcategory_id) 370 384 ); 371 385 … … 379 393 create_date timestamp NOT NULL DEFAULT now(), 380 394 update_date timestamp, 381 del_flg 395 del_flg int2 NOT NULL DEFAULT 0 382 396 ); 383 397 … … 455 469 create_date timestamp NOT NULL DEFAULT now(), 456 470 update_date timestamp, 457 del_flg int2 NOT NULL DEFAULT 0 471 del_flg int2 NOT NULL DEFAULT 0, 472 PRIMARY KEY (review_id) 458 473 ); 459 474 … … 486 501 487 502 CREATE TABLE dtb_news ( 488 news_id serial NOT NULL UNIQUE,503 news_id serial NOT NULL, 489 504 news_date timestamp, 490 505 rank int4, … … 497 512 create_date timestamp NOT NULL DEFAULT now(), 498 513 update_date timestamp, 499 del_flg int2 NOT NULL DEFAULT 0 514 del_flg int2 NOT NULL DEFAULT 0, 515 PRIMARY KEY (news_id) 500 516 ); 501 517 … … 510 526 create_date timestamp NOT NULL DEFAULT now(), 511 527 update_date timestamp, 512 del_flg int2 NOT NULL DEFAULT 0 528 del_flg int2 NOT NULL DEFAULT 0, 529 PRIMARY KEY (best_id) 513 530 ); 514 531 … … 520 537 creator_id int4 NOT NULL, 521 538 subject text, 522 mail_body text 539 mail_body text, 540 PRIMARY KEY (send_id) 523 541 ); 524 542 … … 558 576 create_date timestamp NOT NULL DEFAULT now(), 559 577 update_date timestamp DEFAULT now(), 560 del_flg 578 del_flg int2 NOT NULL DEFAULT 0, 561 579 cell01 text, 562 580 cell02 text, 563 581 cell03 text, 564 582 mobile_phone_id text, 565 mailmaga_flg int2 583 mailmaga_flg int2, 584 PRIMARY KEY (customer_id) 566 585 ); 567 586 … … 571 590 email text NOT NULL UNIQUE, 572 591 mail_flag int2, 573 temp_id text NOT NULL UNIQUE,592 temp_id text NOT NULL, 574 593 end_flag int2, 575 594 update_date timestamp NOT NULL DEFAULT Now(), 576 create_data timestamp NOT NULL DEFAULT Now() 595 create_data timestamp NOT NULL DEFAULT Now(), 596 PRIMARY KEY (temp_id) 577 597 ); 578 598 … … 640 660 update_date timestamp, 641 661 commit_date timestamp, 642 del_flg 662 del_flg int2 NOT NULL DEFAULT 0, 643 663 deliv_date text, 644 664 conveni_data text, … … 656 676 memo09 text, 657 677 memo10 text, 658 campaign_id int4 678 campaign_id int4, 679 PRIMARY KEY (order_id) 659 680 ); 660 681 … … 723 744 create_date timestamp NOT NULL DEFAULT now(), 724 745 update_date timestamp, 725 del_flg 746 del_flg int2 NOT NULL DEFAULT 0, 726 747 deliv_date text, 727 748 conveni_data text, … … 757 778 tel01 text, 758 779 tel02 text, 759 tel03 text 780 tel03 text, 781 PRIMARY KEY (other_deliv_id) 760 782 ); 761 783 … … 794 816 update_date timestamp, 795 817 create_date timestamp NOT NULL DEFAULT now(), 796 login_date timestamp 818 login_date timestamp, 819 PRIMARY KEY (member_id) 797 820 ); 798 821 … … 802 825 question text, 803 826 create_date timestamp NOT NULL DEFAULT now(), 804 del_flg int2 NOT NULL DEFAULT 0 827 del_flg int2 NOT NULL DEFAULT 0, 828 PRIMARY KEY (question_id) 805 829 ); 806 830 … … 830 854 question06 text, 831 855 create_date timestamp NOT NULL DEFAULT now(), 832 del_flg int2 NOT NULL DEFAULT 0 856 del_flg int2 NOT NULL DEFAULT 0, 857 PRIMARY KEY (result_id) 833 858 ); 834 859 … … 856 881 del_flg int2 NOT NULL DEFAULT 0, 857 882 create_date timestamp NOT NULL, 858 update_date timestamp NOT NULL DEFAULT now() 883 update_date timestamp NOT NULL DEFAULT now(), 884 PRIMARY KEY (campaign_id) 859 885 ); 860 886 … … 880 906 update_url text, 881 907 create_date timestamp NOT NULL DEFAULT now(), 882 update_date timestamp NOT NULL DEFAULT now() 908 update_date timestamp NOT NULL DEFAULT now(), 909 PRIMARY KEY (page_id) 883 910 ); 884 911 … … 891 918 update_date timestamp NOT NULL DEFAULT now(), 892 919 php_path text, 893 del_flg int2 NOT NULL DEFAULT 0 920 del_flg int2 NOT NULL DEFAULT 0, 921 PRIMARY KEY (bloc_id) 894 922 ); 895 923 … … 910 938 status int2 NOT NULL DEFAULT 1, 911 939 create_date timestamp NOT NULL DEFAULT now(), 912 update_date timestamp NOT NULL DEFAULT now() 940 update_date timestamp NOT NULL DEFAULT now(), 941 PRIMARY KEY (no) 913 942 ); 914 943 … … 918 947 csv_sql text, 919 948 update_date timestamp NOT NULL DEFAULT now(), 920 create_date timestamp NOT NULL DEFAULT now() 949 create_date timestamp NOT NULL DEFAULT now(), 950 PRIMARY KEY (sql_id) 921 951 ); 922 952 … … 936 966 del_flg int2 DEFAULT 0, 937 967 create_date timestamp NOT NULL, 938 update_date timestamp NOT NULL DEFAULT now() 939 ); 940 941 create table dtb_templates 942 ( 943 template_code text NOT NULL UNIQUE , 944 template_name text , 945 create_date timestamp NOT NULL default now(), 946 update_date timestamp NOT NULL default now() 947 ); 948 949 create table dtb_table_comment 950 ( 951 id serial, 952 table_name text, 953 column_name text, 954 description text 968 update_date timestamp NOT NULL DEFAULT now(), 969 PRIMARY KEY (user_id) 970 ); 971 972 create table dtb_templates ( 973 template_code text NOT NULL, 974 template_name text , 975 create_date timestamp NOT NULL default now(), 976 update_date timestamp NOT NULL default now(), 977 PRIMARY KEY (template_code) 978 ); 979 980 create table dtb_table_comment ( 981 id serial, 982 table_name text, 983 column_name text, 984 description text, 985 PRIMARY KEY (id) 955 986 ); 956 987 … … 962 993 create_date timestamp NOT NULL DEFAULT now(), 963 994 update_date timestamp NOT NULL, 964 del_flg int2 NOT NULL DEFAULT 0 995 del_flg int2 NOT NULL DEFAULT 0, 996 PRIMARY KEY (maker_id) 965 997 ); 966 998
Note: See TracChangeset
for help on using the changeset viewer.