- Timestamp:
- 2009/10/15 23:53:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.