| 1 | create table dtb_module_update_logs( |
|---|
| 2 | log_id int NOT NULL, |
|---|
| 3 | module_id int NOT NULL, |
|---|
| 4 | buckup_path text, |
|---|
| 5 | error_flg smallint DEFAULT 0, |
|---|
| 6 | error text, |
|---|
| 7 | ok text, |
|---|
| 8 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 9 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 10 | PRIMARY KEY (log_id) |
|---|
| 11 | ); |
|---|
| 12 | |
|---|
| 13 | CREATE TABLE dtb_ownersstore_settings ( |
|---|
| 14 | public_key text |
|---|
| 15 | ); |
|---|
| 16 | |
|---|
| 17 | CREATE TABLE dtb_kiyaku ( |
|---|
| 18 | kiyaku_id int NOT NULL, |
|---|
| 19 | kiyaku_title text NOT NULL, |
|---|
| 20 | kiyaku_text text NOT NULL, |
|---|
| 21 | rank int NOT NULL DEFAULT 0, |
|---|
| 22 | creator_id int NOT NULL, |
|---|
| 23 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 24 | update_date timestamp NOT NULL, |
|---|
| 25 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 26 | PRIMARY KEY (kiyaku_id) |
|---|
| 27 | ); |
|---|
| 28 | |
|---|
| 29 | CREATE TABLE dtb_holiday ( |
|---|
| 30 | holiday_id int NOT NULL, |
|---|
| 31 | title text NOT 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 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 37 | update_date timestamp NOT NULL, |
|---|
| 38 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 39 | PRIMARY KEY (holiday_id) |
|---|
| 40 | ); |
|---|
| 41 | |
|---|
| 42 | CREATE TABLE mtb_zip ( |
|---|
| 43 | code text, |
|---|
| 44 | old_zipcode text, |
|---|
| 45 | zipcode text, |
|---|
| 46 | state_kana text, |
|---|
| 47 | city_kana text, |
|---|
| 48 | town_kana text, |
|---|
| 49 | state text, |
|---|
| 50 | city text, |
|---|
| 51 | town text, |
|---|
| 52 | flg1 text, |
|---|
| 53 | flg2 text, |
|---|
| 54 | flg3 text, |
|---|
| 55 | flg4 text, |
|---|
| 56 | flg5 text, |
|---|
| 57 | flg6 text |
|---|
| 58 | ); |
|---|
| 59 | |
|---|
| 60 | CREATE TABLE dtb_bat_order_daily_age ( |
|---|
| 61 | order_count numeric NOT NULL DEFAULT 0, |
|---|
| 62 | total numeric NOT NULL DEFAULT 0, |
|---|
| 63 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 64 | start_age smallint, |
|---|
| 65 | end_age smallint, |
|---|
| 66 | member smallint, |
|---|
| 67 | order_date timestamp DEFAULT now(), |
|---|
| 68 | create_date timestamp NOT NULL DEFAULT now() |
|---|
| 69 | ); |
|---|
| 70 | |
|---|
| 71 | CREATE TABLE dtb_update ( |
|---|
| 72 | module_id int NOT NULL, |
|---|
| 73 | module_name text NOT NULL, |
|---|
| 74 | now_version text, |
|---|
| 75 | latest_version text NOT NULL, |
|---|
| 76 | module_explain text, |
|---|
| 77 | main_php text NOT NULL, |
|---|
| 78 | extern_php text NOT NULL, |
|---|
| 79 | install_sql text, |
|---|
| 80 | uninstall_sql text, |
|---|
| 81 | other_files text, |
|---|
| 82 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 83 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 84 | update_date timestamp, |
|---|
| 85 | release_date timestamp NOT NULL, |
|---|
| 86 | PRIMARY KEY (module_id) |
|---|
| 87 | ); |
|---|
| 88 | |
|---|
| 89 | CREATE TABLE dtb_baseinfo ( |
|---|
| 90 | company_name text, |
|---|
| 91 | company_kana text, |
|---|
| 92 | zip01 text, |
|---|
| 93 | zip02 text, |
|---|
| 94 | pref smallint, |
|---|
| 95 | addr01 text, |
|---|
| 96 | addr02 text, |
|---|
| 97 | tel01 text, |
|---|
| 98 | tel02 text, |
|---|
| 99 | tel03 text, |
|---|
| 100 | fax01 text, |
|---|
| 101 | fax02 text, |
|---|
| 102 | fax03 text, |
|---|
| 103 | business_hour text, |
|---|
| 104 | law_company text, |
|---|
| 105 | law_manager text, |
|---|
| 106 | law_zip01 text, |
|---|
| 107 | law_zip02 text, |
|---|
| 108 | law_pref smallint, |
|---|
| 109 | law_addr01 text, |
|---|
| 110 | law_addr02 text, |
|---|
| 111 | law_tel01 text, |
|---|
| 112 | law_tel02 text, |
|---|
| 113 | law_tel03 text, |
|---|
| 114 | law_fax01 text, |
|---|
| 115 | law_fax02 text, |
|---|
| 116 | law_fax03 text, |
|---|
| 117 | law_email text, |
|---|
| 118 | law_url text, |
|---|
| 119 | law_term01 text, |
|---|
| 120 | law_term02 text, |
|---|
| 121 | law_term03 text, |
|---|
| 122 | law_term04 text, |
|---|
| 123 | law_term05 text, |
|---|
| 124 | law_term06 text, |
|---|
| 125 | law_term07 text, |
|---|
| 126 | law_term08 text, |
|---|
| 127 | law_term09 text, |
|---|
| 128 | law_term10 text, |
|---|
| 129 | tax numeric NOT NULL DEFAULT 5, |
|---|
| 130 | tax_rule smallint NOT NULL DEFAULT 1, |
|---|
| 131 | email01 text, |
|---|
| 132 | email02 text, |
|---|
| 133 | email03 text, |
|---|
| 134 | email04 text, |
|---|
| 135 | email05 text, |
|---|
| 136 | free_rule numeric, |
|---|
| 137 | shop_name text, |
|---|
| 138 | shop_kana text, |
|---|
| 139 | shop_name_eng text, |
|---|
| 140 | point_rate numeric NOT NULL DEFAULT 0, |
|---|
| 141 | welcome_point numeric NOT NULL DEFAULT 0, |
|---|
| 142 | update_date timestamp, |
|---|
| 143 | top_tpl text, |
|---|
| 144 | product_tpl text, |
|---|
| 145 | detail_tpl text, |
|---|
| 146 | mypage_tpl text, |
|---|
| 147 | good_traded text, |
|---|
| 148 | message text, |
|---|
| 149 | regular_holiday_ids text, |
|---|
| 150 | latitude text, |
|---|
| 151 | longitude text, |
|---|
| 152 | downloadable_days numeric DEFAULT 30, |
|---|
| 153 | downloadable_days_unlimited smallint |
|---|
| 154 | ); |
|---|
| 155 | |
|---|
| 156 | CREATE TABLE dtb_deliv ( |
|---|
| 157 | deliv_id int NOT NULL, |
|---|
| 158 | product_type_id int, |
|---|
| 159 | name text, |
|---|
| 160 | service_name text, |
|---|
| 161 | confirm_url text, |
|---|
| 162 | rank int, |
|---|
| 163 | status smallint NOT NULL DEFAULT 1, |
|---|
| 164 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 165 | creator_id int NOT NULL, |
|---|
| 166 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 167 | update_date timestamp, |
|---|
| 168 | PRIMARY KEY (deliv_id) |
|---|
| 169 | ); |
|---|
| 170 | |
|---|
| 171 | CREATE TABLE dtb_delivtime ( |
|---|
| 172 | deliv_id int NOT NULL, |
|---|
| 173 | time_id int NOT NULL, |
|---|
| 174 | deliv_time text NOT NULL, |
|---|
| 175 | PRIMARY KEY (deliv_id, time_id) |
|---|
| 176 | ); |
|---|
| 177 | |
|---|
| 178 | CREATE TABLE dtb_delivfee ( |
|---|
| 179 | deliv_id int NOT NULL, |
|---|
| 180 | fee_id int NOT NULL, |
|---|
| 181 | fee text NOT NULL, |
|---|
| 182 | pref smallint, |
|---|
| 183 | PRIMARY KEY (deliv_id, fee_id) |
|---|
| 184 | ); |
|---|
| 185 | |
|---|
| 186 | CREATE TABLE dtb_payment ( |
|---|
| 187 | payment_id int NOT NULL, |
|---|
| 188 | payment_method text, |
|---|
| 189 | charge numeric, |
|---|
| 190 | rule numeric, |
|---|
| 191 | rank int, |
|---|
| 192 | note text, |
|---|
| 193 | fix smallint, |
|---|
| 194 | status smallint NOT NULL DEFAULT 1, |
|---|
| 195 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 196 | creator_id int NOT NULL, |
|---|
| 197 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 198 | update_date timestamp, |
|---|
| 199 | payment_image text, |
|---|
| 200 | upper_rule numeric, |
|---|
| 201 | charge_flg smallint DEFAULT 1, |
|---|
| 202 | rule_min numeric, |
|---|
| 203 | upper_rule_max numeric, |
|---|
| 204 | module_id int, |
|---|
| 205 | module_path text, |
|---|
| 206 | memo01 text, |
|---|
| 207 | memo02 text, |
|---|
| 208 | memo03 text, |
|---|
| 209 | memo04 text, |
|---|
| 210 | memo05 text, |
|---|
| 211 | memo06 text, |
|---|
| 212 | memo07 text, |
|---|
| 213 | memo08 text, |
|---|
| 214 | memo09 text, |
|---|
| 215 | memo10 text, |
|---|
| 216 | PRIMARY KEY (payment_id) |
|---|
| 217 | ); |
|---|
| 218 | |
|---|
| 219 | CREATE TABLE dtb_payment_options ( |
|---|
| 220 | product_class_id int NOT NULL, |
|---|
| 221 | payment_id int NOT NULL, |
|---|
| 222 | rank int, |
|---|
| 223 | PRIMARY KEY(product_class_id, payment_id) |
|---|
| 224 | ); |
|---|
| 225 | |
|---|
| 226 | CREATE TABLE dtb_product_type_options ( |
|---|
| 227 | product_type_id int NOT NULL, |
|---|
| 228 | deliv_id int NOT NULL, |
|---|
| 229 | rank int, |
|---|
| 230 | PRIMARY KEY(product_type_id, deliv_id) |
|---|
| 231 | ); |
|---|
| 232 | |
|---|
| 233 | CREATE TABLE dtb_mailtemplate ( |
|---|
| 234 | template_id int NOT NULL, |
|---|
| 235 | subject text, |
|---|
| 236 | header text, |
|---|
| 237 | footer text, |
|---|
| 238 | creator_id int NOT NULL, |
|---|
| 239 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 240 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 241 | update_date timestamp NOT NULL |
|---|
| 242 | ); |
|---|
| 243 | |
|---|
| 244 | CREATE TABLE dtb_send_history ( |
|---|
| 245 | send_id int NOT NULL, |
|---|
| 246 | mail_method smallint, |
|---|
| 247 | subject text, |
|---|
| 248 | body text, |
|---|
| 249 | send_count int, |
|---|
| 250 | complete_count int NOT NULL DEFAULT 0, |
|---|
| 251 | start_date timestamp, |
|---|
| 252 | end_date timestamp, |
|---|
| 253 | search_data text, |
|---|
| 254 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 255 | creator_id int NOT NULL, |
|---|
| 256 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 257 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 258 | PRIMARY KEY (send_id) |
|---|
| 259 | ); |
|---|
| 260 | |
|---|
| 261 | CREATE TABLE dtb_send_customer ( |
|---|
| 262 | customer_id int, |
|---|
| 263 | send_id int NOT NULL, |
|---|
| 264 | email text, |
|---|
| 265 | name text, |
|---|
| 266 | send_flag smallint, |
|---|
| 267 | PRIMARY KEY (send_id, customer_id) |
|---|
| 268 | ); |
|---|
| 269 | |
|---|
| 270 | CREATE TABLE dtb_products ( |
|---|
| 271 | product_id int NOT NULL, |
|---|
| 272 | name text NOT NULL, |
|---|
| 273 | maker_id int, |
|---|
| 274 | rank int, |
|---|
| 275 | status smallint NOT NULL DEFAULT 2, |
|---|
| 276 | comment1 text, |
|---|
| 277 | comment2 text, |
|---|
| 278 | comment3 text, |
|---|
| 279 | comment4 text, |
|---|
| 280 | comment5 text, |
|---|
| 281 | comment6 text, |
|---|
| 282 | note text, |
|---|
| 283 | main_list_comment text, |
|---|
| 284 | main_list_image text, |
|---|
| 285 | main_comment text, |
|---|
| 286 | main_image text, |
|---|
| 287 | main_large_image text, |
|---|
| 288 | sub_title1 text, |
|---|
| 289 | sub_comment1 text, |
|---|
| 290 | sub_image1 text, |
|---|
| 291 | sub_large_image1 text, |
|---|
| 292 | sub_title2 text, |
|---|
| 293 | sub_comment2 text, |
|---|
| 294 | sub_image2 text, |
|---|
| 295 | sub_large_image2 text, |
|---|
| 296 | sub_title3 text, |
|---|
| 297 | sub_comment3 text, |
|---|
| 298 | sub_image3 text, |
|---|
| 299 | sub_large_image3 text, |
|---|
| 300 | sub_title4 text, |
|---|
| 301 | sub_comment4 text, |
|---|
| 302 | sub_image4 text, |
|---|
| 303 | sub_large_image4 text, |
|---|
| 304 | sub_title5 text, |
|---|
| 305 | sub_comment5 text, |
|---|
| 306 | sub_image5 text, |
|---|
| 307 | sub_large_image5 text, |
|---|
| 308 | sub_title6 text, |
|---|
| 309 | sub_comment6 text, |
|---|
| 310 | sub_image6 text, |
|---|
| 311 | sub_large_image6 text, |
|---|
| 312 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 313 | creator_id int NOT NULL, |
|---|
| 314 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 315 | update_date timestamp, |
|---|
| 316 | deliv_date_id int, |
|---|
| 317 | PRIMARY KEY (product_id) |
|---|
| 318 | ); |
|---|
| 319 | |
|---|
| 320 | CREATE TABLE dtb_products_class ( |
|---|
| 321 | product_class_id int NOT NULL, |
|---|
| 322 | product_id int NOT NULL, |
|---|
| 323 | class_combination_id int, |
|---|
| 324 | product_type_id int NOT NULL DEFAULT 0, |
|---|
| 325 | product_code text, |
|---|
| 326 | stock numeric, |
|---|
| 327 | stock_unlimited smallint NOT NULL DEFAULT 0, |
|---|
| 328 | sale_limit numeric, |
|---|
| 329 | price01 numeric, |
|---|
| 330 | price02 numeric, |
|---|
| 331 | deliv_fee numeric, |
|---|
| 332 | point_rate numeric, |
|---|
| 333 | creator_id int NOT NULL, |
|---|
| 334 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 335 | update_date timestamp, |
|---|
| 336 | down_filename text, |
|---|
| 337 | down_realfilename text, |
|---|
| 338 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 339 | PRIMARY KEY (product_class_id) |
|---|
| 340 | ); |
|---|
| 341 | |
|---|
| 342 | CREATE TABLE dtb_class ( |
|---|
| 343 | class_id int NOT NULL, |
|---|
| 344 | name text, |
|---|
| 345 | rank int, |
|---|
| 346 | creator_id int NOT NULL, |
|---|
| 347 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 348 | update_date timestamp, |
|---|
| 349 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 350 | PRIMARY KEY (class_id) |
|---|
| 351 | ); |
|---|
| 352 | |
|---|
| 353 | CREATE TABLE dtb_classcategory ( |
|---|
| 354 | classcategory_id int NOT NULL, |
|---|
| 355 | name text, |
|---|
| 356 | class_id int NOT NULL, |
|---|
| 357 | rank int, |
|---|
| 358 | creator_id int NOT NULL, |
|---|
| 359 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 360 | update_date timestamp, |
|---|
| 361 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 362 | PRIMARY KEY (classcategory_id) |
|---|
| 363 | ); |
|---|
| 364 | |
|---|
| 365 | CREATE TABLE dtb_class_combination ( |
|---|
| 366 | class_combination_id int NOT NULL, |
|---|
| 367 | parent_class_combination_id int, |
|---|
| 368 | classcategory_id int NOT NULL, |
|---|
| 369 | level int, |
|---|
| 370 | PRIMARY KEY (class_combination_id) |
|---|
| 371 | ); |
|---|
| 372 | |
|---|
| 373 | CREATE TABLE dtb_category ( |
|---|
| 374 | category_id int NOT NULL, |
|---|
| 375 | category_name text, |
|---|
| 376 | parent_category_id int NOT NULL DEFAULT 0, |
|---|
| 377 | level int NOT NULL, |
|---|
| 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 | PRIMARY KEY (category_id) |
|---|
| 384 | ); |
|---|
| 385 | |
|---|
| 386 | CREATE TABLE dtb_product_categories ( |
|---|
| 387 | product_id int NOT NULL, |
|---|
| 388 | category_id int NOT NULL, |
|---|
| 389 | rank int NOT NULL, |
|---|
| 390 | PRIMARY KEY(product_id, category_id) |
|---|
| 391 | ); |
|---|
| 392 | |
|---|
| 393 | CREATE TABLE dtb_product_status ( |
|---|
| 394 | product_status_id smallint NOT NULL, |
|---|
| 395 | product_id int NOT NULL, |
|---|
| 396 | creator_id int NOT NULL, |
|---|
| 397 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 398 | update_date timestamp, |
|---|
| 399 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 400 | PRIMARY KEY (product_status_id, product_id) |
|---|
| 401 | ); |
|---|
| 402 | |
|---|
| 403 | |
|---|
| 404 | CREATE TABLE dtb_bat_order_daily ( |
|---|
| 405 | total_order numeric NOT NULL DEFAULT 0, |
|---|
| 406 | member numeric NOT NULL DEFAULT 0, |
|---|
| 407 | nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 408 | men numeric NOT NULL DEFAULT 0, |
|---|
| 409 | women numeric NOT NULL DEFAULT 0, |
|---|
| 410 | men_member numeric NOT NULL DEFAULT 0, |
|---|
| 411 | men_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 412 | women_member numeric NOT NULL DEFAULT 0, |
|---|
| 413 | women_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 414 | total numeric NOT NULL DEFAULT 0, |
|---|
| 415 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 416 | order_date timestamp NOT NULL DEFAULT now(), |
|---|
| 417 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 418 | year smallint NOT NULL, |
|---|
| 419 | month smallint NOT NULL, |
|---|
| 420 | day smallint NOT NULL, |
|---|
| 421 | wday smallint NOT NULL, |
|---|
| 422 | key_day text NOT NULL, |
|---|
| 423 | key_month text NOT NULL, |
|---|
| 424 | key_year text NOT NULL, |
|---|
| 425 | key_wday text NOT NULL |
|---|
| 426 | ); |
|---|
| 427 | |
|---|
| 428 | CREATE TABLE dtb_bat_order_daily_hour ( |
|---|
| 429 | total_order numeric NOT NULL DEFAULT 0, |
|---|
| 430 | member numeric NOT NULL DEFAULT 0, |
|---|
| 431 | nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 432 | men numeric NOT NULL DEFAULT 0, |
|---|
| 433 | women numeric NOT NULL DEFAULT 0, |
|---|
| 434 | men_member numeric NOT NULL DEFAULT 0, |
|---|
| 435 | men_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 436 | women_member numeric NOT NULL DEFAULT 0, |
|---|
| 437 | women_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 438 | total numeric NOT NULL DEFAULT 0, |
|---|
| 439 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 440 | hour smallint NOT NULL DEFAULT 0, |
|---|
| 441 | order_date timestamp DEFAULT now(), |
|---|
| 442 | create_date timestamp NOT NULL DEFAULT now() |
|---|
| 443 | ); |
|---|
| 444 | |
|---|
| 445 | CREATE TABLE dtb_recommend_products ( |
|---|
| 446 | product_id int NOT NULL, |
|---|
| 447 | recommend_product_id int NOT NULL, |
|---|
| 448 | rank int NOT NULL, |
|---|
| 449 | comment text, |
|---|
| 450 | status smallint NOT NULL DEFAULT 0, |
|---|
| 451 | creator_id int NOT NULL, |
|---|
| 452 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 453 | update_date timestamp NOT NULL DEFAULT now() |
|---|
| 454 | ); |
|---|
| 455 | |
|---|
| 456 | CREATE TABLE dtb_review ( |
|---|
| 457 | review_id int NOT NULL, |
|---|
| 458 | product_id int NOT NULL, |
|---|
| 459 | reviewer_name text NOT NULL, |
|---|
| 460 | reviewer_url text, |
|---|
| 461 | sex smallint, |
|---|
| 462 | customer_id int, |
|---|
| 463 | recommend_level smallint NOT NULL, |
|---|
| 464 | title text NOT NULL, |
|---|
| 465 | comment text NOT NULL, |
|---|
| 466 | status smallint DEFAULT 2, |
|---|
| 467 | creator_id int NOT NULL, |
|---|
| 468 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 469 | update_date timestamp, |
|---|
| 470 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 471 | PRIMARY KEY (review_id) |
|---|
| 472 | ); |
|---|
| 473 | |
|---|
| 474 | CREATE TABLE dtb_customer_favorite_products ( |
|---|
| 475 | customer_id int NOT NULL, |
|---|
| 476 | product_id int NOT NULL, |
|---|
| 477 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 478 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 479 | PRIMARY KEY (customer_id, product_id) |
|---|
| 480 | ); |
|---|
| 481 | |
|---|
| 482 | CREATE TABLE dtb_category_count ( |
|---|
| 483 | category_id int NOT NULL, |
|---|
| 484 | product_count int NOT NULL, |
|---|
| 485 | create_date timestamp NOT NULL DEFAULT Now() |
|---|
| 486 | ); |
|---|
| 487 | |
|---|
| 488 | CREATE TABLE dtb_category_total_count ( |
|---|
| 489 | category_id int NOT NULL, |
|---|
| 490 | product_count int, |
|---|
| 491 | create_date timestamp NOT NULL DEFAULT Now() |
|---|
| 492 | ); |
|---|
| 493 | |
|---|
| 494 | CREATE TABLE dtb_news ( |
|---|
| 495 | news_id int NOT NULL, |
|---|
| 496 | news_date timestamp, |
|---|
| 497 | rank int, |
|---|
| 498 | news_title text NOT NULL, |
|---|
| 499 | news_comment text, |
|---|
| 500 | news_url text, |
|---|
| 501 | news_select smallint NOT NULL DEFAULT 0, |
|---|
| 502 | link_method text, |
|---|
| 503 | creator_id int NOT NULL, |
|---|
| 504 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 505 | update_date timestamp, |
|---|
| 506 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 507 | PRIMARY KEY (news_id) |
|---|
| 508 | ); |
|---|
| 509 | |
|---|
| 510 | CREATE TABLE dtb_best_products ( |
|---|
| 511 | best_id int NOT NULL, |
|---|
| 512 | category_id int NOT NULL, |
|---|
| 513 | rank int NOT NULL DEFAULT 0, |
|---|
| 514 | product_id int NOT NULL, |
|---|
| 515 | title text, |
|---|
| 516 | comment text, |
|---|
| 517 | creator_id int NOT NULL, |
|---|
| 518 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 519 | update_date timestamp, |
|---|
| 520 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 521 | PRIMARY KEY (best_id) |
|---|
| 522 | ); |
|---|
| 523 | |
|---|
| 524 | CREATE TABLE dtb_mail_history ( |
|---|
| 525 | send_id int NOT NULL, |
|---|
| 526 | order_id int NOT NULL, |
|---|
| 527 | send_date timestamp, |
|---|
| 528 | template_id int, |
|---|
| 529 | creator_id int NOT NULL, |
|---|
| 530 | subject text, |
|---|
| 531 | mail_body text, |
|---|
| 532 | PRIMARY KEY (send_id) |
|---|
| 533 | ); |
|---|
| 534 | |
|---|
| 535 | CREATE TABLE dtb_customer ( |
|---|
| 536 | customer_id int NOT NULL, |
|---|
| 537 | name01 text NOT NULL, |
|---|
| 538 | name02 text NOT NULL, |
|---|
| 539 | kana01 text NOT NULL, |
|---|
| 540 | kana02 text NOT NULL, |
|---|
| 541 | zip01 text, |
|---|
| 542 | zip02 text, |
|---|
| 543 | pref smallint, |
|---|
| 544 | addr01 text, |
|---|
| 545 | addr02 text, |
|---|
| 546 | email text NOT NULL, |
|---|
| 547 | email_mobile text, |
|---|
| 548 | tel01 text, |
|---|
| 549 | tel02 text, |
|---|
| 550 | tel03 text, |
|---|
| 551 | fax01 text, |
|---|
| 552 | fax02 text, |
|---|
| 553 | fax03 text, |
|---|
| 554 | sex smallint, |
|---|
| 555 | job smallint, |
|---|
| 556 | birth timestamp, |
|---|
| 557 | password text, |
|---|
| 558 | reminder smallint, |
|---|
| 559 | reminder_answer text, |
|---|
| 560 | secret_key text NOT NULL UNIQUE, |
|---|
| 561 | first_buy_date timestamp, |
|---|
| 562 | last_buy_date timestamp, |
|---|
| 563 | buy_times numeric DEFAULT 0, |
|---|
| 564 | buy_total numeric DEFAULT 0, |
|---|
| 565 | point numeric DEFAULT 0, |
|---|
| 566 | note text, |
|---|
| 567 | status smallint NOT NULL DEFAULT 1, |
|---|
| 568 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 569 | update_date timestamp DEFAULT now(), |
|---|
| 570 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 571 | mobile_phone_id text, |
|---|
| 572 | mailmaga_flg smallint, |
|---|
| 573 | PRIMARY KEY (customer_id) |
|---|
| 574 | ); |
|---|
| 575 | |
|---|
| 576 | CREATE TABLE dtb_order ( |
|---|
| 577 | order_id int NOT NULL, |
|---|
| 578 | order_temp_id text, |
|---|
| 579 | customer_id int NOT NULL, |
|---|
| 580 | message text, |
|---|
| 581 | order_name01 text, |
|---|
| 582 | order_name02 text, |
|---|
| 583 | order_kana01 text, |
|---|
| 584 | order_kana02 text, |
|---|
| 585 | order_email text, |
|---|
| 586 | order_tel01 text, |
|---|
| 587 | order_tel02 text, |
|---|
| 588 | order_tel03 text, |
|---|
| 589 | order_fax01 text, |
|---|
| 590 | order_fax02 text, |
|---|
| 591 | order_fax03 text, |
|---|
| 592 | order_zip01 text, |
|---|
| 593 | order_zip02 text, |
|---|
| 594 | order_pref smallint, |
|---|
| 595 | order_addr01 text, |
|---|
| 596 | order_addr02 text, |
|---|
| 597 | order_sex smallint, |
|---|
| 598 | order_birth timestamp, |
|---|
| 599 | order_job int, |
|---|
| 600 | deliv_name01 text, |
|---|
| 601 | deliv_name02 text, |
|---|
| 602 | deliv_kana01 text, |
|---|
| 603 | deliv_kana02 text, |
|---|
| 604 | deliv_tel01 text, |
|---|
| 605 | deliv_tel02 text, |
|---|
| 606 | deliv_tel03 text, |
|---|
| 607 | deliv_fax01 text, |
|---|
| 608 | deliv_fax02 text, |
|---|
| 609 | deliv_fax03 text, |
|---|
| 610 | deliv_zip01 text, |
|---|
| 611 | deliv_zip02 text, |
|---|
| 612 | deliv_pref smallint, |
|---|
| 613 | deliv_addr01 text, |
|---|
| 614 | deliv_addr02 text, |
|---|
| 615 | subtotal numeric, |
|---|
| 616 | discount numeric, |
|---|
| 617 | deliv_fee numeric, |
|---|
| 618 | charge numeric, |
|---|
| 619 | use_point numeric, |
|---|
| 620 | add_point numeric, |
|---|
| 621 | birth_point numeric DEFAULT 0, |
|---|
| 622 | tax numeric, |
|---|
| 623 | total numeric, |
|---|
| 624 | payment_total numeric, |
|---|
| 625 | payment_id int, |
|---|
| 626 | payment_method text, |
|---|
| 627 | deliv_id int, |
|---|
| 628 | deliv_time_id int, |
|---|
| 629 | deliv_time text, |
|---|
| 630 | deliv_no text, |
|---|
| 631 | note text, |
|---|
| 632 | status smallint, |
|---|
| 633 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 634 | loan_result text, |
|---|
| 635 | credit_result text, |
|---|
| 636 | credit_msg text, |
|---|
| 637 | update_date timestamp, |
|---|
| 638 | commit_date timestamp, |
|---|
| 639 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 640 | deliv_date text, |
|---|
| 641 | conveni_data text, |
|---|
| 642 | cell01 text, |
|---|
| 643 | cell02 text, |
|---|
| 644 | cell03 text, |
|---|
| 645 | memo01 text, |
|---|
| 646 | memo02 text, |
|---|
| 647 | memo03 text, |
|---|
| 648 | memo04 text, |
|---|
| 649 | memo05 text, |
|---|
| 650 | memo06 text, |
|---|
| 651 | memo07 text, |
|---|
| 652 | memo08 text, |
|---|
| 653 | memo09 text, |
|---|
| 654 | memo10 text, |
|---|
| 655 | payment_date timestamp, |
|---|
| 656 | PRIMARY KEY (order_id) |
|---|
| 657 | ); |
|---|
| 658 | |
|---|
| 659 | CREATE TABLE dtb_order_temp ( |
|---|
| 660 | order_temp_id text NOT NULL, |
|---|
| 661 | customer_id int NOT NULL, |
|---|
| 662 | message text, |
|---|
| 663 | order_name01 text, |
|---|
| 664 | order_name02 text, |
|---|
| 665 | order_kana01 text, |
|---|
| 666 | order_kana02 text, |
|---|
| 667 | order_email text, |
|---|
| 668 | order_tel01 text, |
|---|
| 669 | order_tel02 text, |
|---|
| 670 | order_tel03 text, |
|---|
| 671 | order_fax01 text, |
|---|
| 672 | order_fax02 text, |
|---|
| 673 | order_fax03 text, |
|---|
| 674 | order_zip01 text, |
|---|
| 675 | order_zip02 text, |
|---|
| 676 | order_pref smallint, |
|---|
| 677 | order_addr01 text, |
|---|
| 678 | order_addr02 text, |
|---|
| 679 | order_sex smallint, |
|---|
| 680 | order_birth timestamp, |
|---|
| 681 | order_job int, |
|---|
| 682 | deliv_name01 text, |
|---|
| 683 | deliv_name02 text, |
|---|
| 684 | deliv_kana01 text, |
|---|
| 685 | deliv_kana02 text, |
|---|
| 686 | deliv_tel01 text, |
|---|
| 687 | deliv_tel02 text, |
|---|
| 688 | deliv_tel03 text, |
|---|
| 689 | deliv_fax01 text, |
|---|
| 690 | deliv_fax02 text, |
|---|
| 691 | deliv_fax03 text, |
|---|
| 692 | deliv_zip01 text, |
|---|
| 693 | deliv_zip02 text, |
|---|
| 694 | deliv_pref smallint, |
|---|
| 695 | deliv_addr01 text, |
|---|
| 696 | deliv_addr02 text, |
|---|
| 697 | subtotal numeric, |
|---|
| 698 | discount numeric, |
|---|
| 699 | deliv_fee numeric, |
|---|
| 700 | charge numeric, |
|---|
| 701 | use_point numeric, |
|---|
| 702 | add_point numeric, |
|---|
| 703 | birth_point numeric DEFAULT 0, |
|---|
| 704 | tax numeric, |
|---|
| 705 | total numeric, |
|---|
| 706 | payment_total numeric, |
|---|
| 707 | payment_id int, |
|---|
| 708 | payment_method text, |
|---|
| 709 | deliv_id int, |
|---|
| 710 | deliv_time_id int, |
|---|
| 711 | deliv_time text, |
|---|
| 712 | deliv_no text, |
|---|
| 713 | note text, |
|---|
| 714 | mail_flag smallint, |
|---|
| 715 | status smallint, |
|---|
| 716 | deliv_check smallint, |
|---|
| 717 | point_check smallint, |
|---|
| 718 | loan_result text, |
|---|
| 719 | credit_result text, |
|---|
| 720 | credit_msg text, |
|---|
| 721 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 722 | update_date timestamp, |
|---|
| 723 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 724 | deliv_date text, |
|---|
| 725 | conveni_data text, |
|---|
| 726 | cell01 text, |
|---|
| 727 | cell02 text, |
|---|
| 728 | cell03 text, |
|---|
| 729 | order_id int, |
|---|
| 730 | memo01 text, |
|---|
| 731 | memo02 text, |
|---|
| 732 | memo03 text, |
|---|
| 733 | memo04 text, |
|---|
| 734 | memo05 text, |
|---|
| 735 | memo06 text, |
|---|
| 736 | memo07 text, |
|---|
| 737 | memo08 text, |
|---|
| 738 | memo09 text, |
|---|
| 739 | memo10 text, |
|---|
| 740 | session text |
|---|
| 741 | ); |
|---|
| 742 | |
|---|
| 743 | CREATE TABLE dtb_other_deliv ( |
|---|
| 744 | other_deliv_id int NOT NULL, |
|---|
| 745 | customer_id int NOT NULL, |
|---|
| 746 | name01 text, |
|---|
| 747 | name02 text, |
|---|
| 748 | kana01 text, |
|---|
| 749 | kana02 text, |
|---|
| 750 | zip01 text, |
|---|
| 751 | zip02 text, |
|---|
| 752 | pref smallint, |
|---|
| 753 | addr01 text, |
|---|
| 754 | addr02 text, |
|---|
| 755 | tel01 text, |
|---|
| 756 | tel02 text, |
|---|
| 757 | tel03 text, |
|---|
| 758 | PRIMARY KEY (other_deliv_id) |
|---|
| 759 | ); |
|---|
| 760 | |
|---|
| 761 | CREATE TABLE dtb_order_detail ( |
|---|
| 762 | order_id int NOT NULL, |
|---|
| 763 | product_id int NOT NULL, |
|---|
| 764 | product_class_id int NOT NULL, |
|---|
| 765 | product_name text NOT NULL, |
|---|
| 766 | product_code text, |
|---|
| 767 | classcategory_name1 text, |
|---|
| 768 | classcategory_name2 text, |
|---|
| 769 | price numeric, |
|---|
| 770 | quantity numeric, |
|---|
| 771 | point_rate numeric |
|---|
| 772 | ); |
|---|
| 773 | |
|---|
| 774 | CREATE TABLE mtb_pref ( |
|---|
| 775 | pref_id smallint NOT NULL, |
|---|
| 776 | pref_name text, |
|---|
| 777 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 778 | PRIMARY KEY (pref_id) |
|---|
| 779 | ); |
|---|
| 780 | |
|---|
| 781 | CREATE TABLE dtb_member ( |
|---|
| 782 | member_id int NOT NULL, |
|---|
| 783 | name text, |
|---|
| 784 | department text, |
|---|
| 785 | login_id text NOT NULL, |
|---|
| 786 | password text NOT NULL, |
|---|
| 787 | authority smallint NOT NULL, |
|---|
| 788 | rank int NOT NULL DEFAULT 0, |
|---|
| 789 | work smallint NOT NULL DEFAULT 1, |
|---|
| 790 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 791 | creator_id int NOT NULL, |
|---|
| 792 | update_date timestamp, |
|---|
| 793 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 794 | login_date timestamp, |
|---|
| 795 | PRIMARY KEY (member_id) |
|---|
| 796 | ); |
|---|
| 797 | |
|---|
| 798 | CREATE TABLE dtb_bat_relate_products ( |
|---|
| 799 | product_id int, |
|---|
| 800 | relate_product_id int, |
|---|
| 801 | customer_id int, |
|---|
| 802 | create_date timestamp DEFAULT now() |
|---|
| 803 | ); |
|---|
| 804 | |
|---|
| 805 | CREATE TABLE dtb_pagelayout ( |
|---|
| 806 | page_id int NOT NULL, |
|---|
| 807 | page_name text, |
|---|
| 808 | url text NOT NULL, |
|---|
| 809 | php_dir text, |
|---|
| 810 | tpl_dir text, |
|---|
| 811 | filename text, |
|---|
| 812 | header_chk smallint DEFAULT 1, |
|---|
| 813 | footer_chk smallint DEFAULT 1, |
|---|
| 814 | edit_flg smallint DEFAULT 1, |
|---|
| 815 | author text, |
|---|
| 816 | description text, |
|---|
| 817 | keyword text, |
|---|
| 818 | update_url text, |
|---|
| 819 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 820 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 821 | PRIMARY KEY (page_id) |
|---|
| 822 | ); |
|---|
| 823 | |
|---|
| 824 | CREATE TABLE dtb_bloc ( |
|---|
| 825 | bloc_id int NOT NULL, |
|---|
| 826 | bloc_name text, |
|---|
| 827 | tpl_path text, |
|---|
| 828 | filename text NOT NULL UNIQUE, |
|---|
| 829 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 830 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 831 | php_path text, |
|---|
| 832 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 833 | PRIMARY KEY (bloc_id) |
|---|
| 834 | ); |
|---|
| 835 | |
|---|
| 836 | CREATE TABLE dtb_blocposition ( |
|---|
| 837 | page_id int NOT NULL, |
|---|
| 838 | target_id int, |
|---|
| 839 | bloc_id int, |
|---|
| 840 | bloc_row int, |
|---|
| 841 | filename text, |
|---|
| 842 | anywhere smallint DEFAULT 0 NOT NULL |
|---|
| 843 | ); |
|---|
| 844 | |
|---|
| 845 | CREATE TABLE dtb_csv ( |
|---|
| 846 | no int, |
|---|
| 847 | csv_id int NOT NULL, |
|---|
| 848 | col text, |
|---|
| 849 | disp_name text, |
|---|
| 850 | rank int, |
|---|
| 851 | status smallint NOT NULL DEFAULT 1, |
|---|
| 852 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 853 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 854 | mb_convert_kana_option text, |
|---|
| 855 | PRIMARY KEY (no) |
|---|
| 856 | ); |
|---|
| 857 | |
|---|
| 858 | CREATE TABLE dtb_csv_sql ( |
|---|
| 859 | sql_id int, |
|---|
| 860 | sql_name text NOT NULL, |
|---|
| 861 | csv_sql text, |
|---|
| 862 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 863 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 864 | PRIMARY KEY (sql_id) |
|---|
| 865 | ); |
|---|
| 866 | |
|---|
| 867 | create table dtb_templates ( |
|---|
| 868 | template_code text NOT NULL, |
|---|
| 869 | template_name text, |
|---|
| 870 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 871 | update_date timestamp NOT NULL DEFAULT now(), |
|---|
| 872 | PRIMARY KEY (template_code) |
|---|
| 873 | ); |
|---|
| 874 | |
|---|
| 875 | create table dtb_table_comment ( |
|---|
| 876 | id int, |
|---|
| 877 | table_name text, |
|---|
| 878 | column_name text, |
|---|
| 879 | description text, |
|---|
| 880 | PRIMARY KEY (id) |
|---|
| 881 | ); |
|---|
| 882 | |
|---|
| 883 | CREATE TABLE dtb_maker ( |
|---|
| 884 | maker_id int NOT NULL, |
|---|
| 885 | name text NOT NULL, |
|---|
| 886 | rank int NOT NULL DEFAULT 0, |
|---|
| 887 | creator_id int NOT NULL, |
|---|
| 888 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 889 | update_date timestamp NOT NULL, |
|---|
| 890 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 891 | PRIMARY KEY (maker_id) |
|---|
| 892 | ); |
|---|
| 893 | |
|---|
| 894 | CREATE TABLE dtb_maker_count ( |
|---|
| 895 | maker_id int NOT NULL, |
|---|
| 896 | product_count int NOT NULL, |
|---|
| 897 | create_date timestamp NOT NULL DEFAULT Now() |
|---|
| 898 | ); |
|---|
| 899 | |
|---|
| 900 | CREATE TABLE mtb_permission ( |
|---|
| 901 | id text, |
|---|
| 902 | name text, |
|---|
| 903 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 904 | PRIMARY KEY (id) |
|---|
| 905 | ); |
|---|
| 906 | |
|---|
| 907 | CREATE TABLE mtb_disable_logout ( |
|---|
| 908 | id smallint, |
|---|
| 909 | name text, |
|---|
| 910 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 911 | PRIMARY KEY (id) |
|---|
| 912 | ); |
|---|
| 913 | |
|---|
| 914 | CREATE TABLE mtb_authority ( |
|---|
| 915 | id smallint, |
|---|
| 916 | name text, |
|---|
| 917 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 918 | PRIMARY KEY (id) |
|---|
| 919 | ); |
|---|
| 920 | |
|---|
| 921 | CREATE TABLE mtb_work ( |
|---|
| 922 | id smallint, |
|---|
| 923 | name text, |
|---|
| 924 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 925 | PRIMARY KEY (id) |
|---|
| 926 | ); |
|---|
| 927 | |
|---|
| 928 | CREATE TABLE mtb_disp ( |
|---|
| 929 | id smallint, |
|---|
| 930 | name text, |
|---|
| 931 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 932 | PRIMARY KEY (id) |
|---|
| 933 | ); |
|---|
| 934 | |
|---|
| 935 | CREATE TABLE mtb_class ( |
|---|
| 936 | id smallint, |
|---|
| 937 | name text, |
|---|
| 938 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 939 | PRIMARY KEY (id) |
|---|
| 940 | ); |
|---|
| 941 | |
|---|
| 942 | CREATE TABLE mtb_status ( |
|---|
| 943 | id smallint, |
|---|
| 944 | name text, |
|---|
| 945 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 946 | PRIMARY KEY (id) |
|---|
| 947 | ); |
|---|
| 948 | |
|---|
| 949 | CREATE TABLE mtb_status_image ( |
|---|
| 950 | id smallint, |
|---|
| 951 | name text, |
|---|
| 952 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 953 | PRIMARY KEY (id) |
|---|
| 954 | ); |
|---|
| 955 | |
|---|
| 956 | CREATE TABLE mtb_allowed_tag ( |
|---|
| 957 | id smallint, |
|---|
| 958 | name text, |
|---|
| 959 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 960 | PRIMARY KEY (id) |
|---|
| 961 | ); |
|---|
| 962 | |
|---|
| 963 | CREATE TABLE mtb_page_max ( |
|---|
| 964 | id smallint, |
|---|
| 965 | name text, |
|---|
| 966 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 967 | PRIMARY KEY (id) |
|---|
| 968 | ); |
|---|
| 969 | |
|---|
| 970 | CREATE TABLE mtb_magazine_type ( |
|---|
| 971 | id smallint, |
|---|
| 972 | name text, |
|---|
| 973 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 974 | PRIMARY KEY (id) |
|---|
| 975 | ); |
|---|
| 976 | |
|---|
| 977 | CREATE TABLE mtb_mail_magazine_type ( |
|---|
| 978 | id smallint, |
|---|
| 979 | name text, |
|---|
| 980 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 981 | PRIMARY KEY (id) |
|---|
| 982 | ); |
|---|
| 983 | |
|---|
| 984 | CREATE TABLE mtb_recommend ( |
|---|
| 985 | id smallint, |
|---|
| 986 | name text, |
|---|
| 987 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 988 | PRIMARY KEY (id) |
|---|
| 989 | ); |
|---|
| 990 | |
|---|
| 991 | CREATE TABLE mtb_taxrule ( |
|---|
| 992 | id smallint, |
|---|
| 993 | name text, |
|---|
| 994 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 995 | PRIMARY KEY (id) |
|---|
| 996 | ); |
|---|
| 997 | |
|---|
| 998 | CREATE TABLE mtb_mail_template ( |
|---|
| 999 | id smallint, |
|---|
| 1000 | name text, |
|---|
| 1001 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1002 | PRIMARY KEY (id) |
|---|
| 1003 | ); |
|---|
| 1004 | |
|---|
| 1005 | CREATE TABLE mtb_mail_tpl_path ( |
|---|
| 1006 | id smallint, |
|---|
| 1007 | name text, |
|---|
| 1008 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1009 | PRIMARY KEY (id) |
|---|
| 1010 | ); |
|---|
| 1011 | |
|---|
| 1012 | CREATE TABLE mtb_job ( |
|---|
| 1013 | id smallint, |
|---|
| 1014 | name text, |
|---|
| 1015 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1016 | PRIMARY KEY (id) |
|---|
| 1017 | ); |
|---|
| 1018 | |
|---|
| 1019 | CREATE TABLE mtb_reminder ( |
|---|
| 1020 | id smallint, |
|---|
| 1021 | name text, |
|---|
| 1022 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1023 | PRIMARY KEY (id) |
|---|
| 1024 | ); |
|---|
| 1025 | |
|---|
| 1026 | CREATE TABLE mtb_sex ( |
|---|
| 1027 | id smallint, |
|---|
| 1028 | name text, |
|---|
| 1029 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1030 | PRIMARY KEY (id) |
|---|
| 1031 | ); |
|---|
| 1032 | |
|---|
| 1033 | CREATE TABLE mtb_page_rows ( |
|---|
| 1034 | id smallint, |
|---|
| 1035 | name text, |
|---|
| 1036 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1037 | PRIMARY KEY (id) |
|---|
| 1038 | ); |
|---|
| 1039 | |
|---|
| 1040 | CREATE TABLE mtb_mail_type ( |
|---|
| 1041 | id smallint, |
|---|
| 1042 | name text, |
|---|
| 1043 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1044 | PRIMARY KEY (id) |
|---|
| 1045 | ); |
|---|
| 1046 | |
|---|
| 1047 | CREATE TABLE mtb_order_status ( |
|---|
| 1048 | id smallint, |
|---|
| 1049 | name text, |
|---|
| 1050 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1051 | PRIMARY KEY (id) |
|---|
| 1052 | ); |
|---|
| 1053 | |
|---|
| 1054 | CREATE TABLE mtb_product_status_color ( |
|---|
| 1055 | id smallint, |
|---|
| 1056 | name text, |
|---|
| 1057 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1058 | PRIMARY KEY (id) |
|---|
| 1059 | ); |
|---|
| 1060 | |
|---|
| 1061 | CREATE TABLE mtb_order_status_color ( |
|---|
| 1062 | id smallint, |
|---|
| 1063 | name text, |
|---|
| 1064 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1065 | PRIMARY KEY (id) |
|---|
| 1066 | ); |
|---|
| 1067 | |
|---|
| 1068 | CREATE TABLE mtb_wday ( |
|---|
| 1069 | id smallint, |
|---|
| 1070 | name text, |
|---|
| 1071 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1072 | PRIMARY KEY (id) |
|---|
| 1073 | ); |
|---|
| 1074 | |
|---|
| 1075 | CREATE TABLE mtb_delivery_date ( |
|---|
| 1076 | id smallint, |
|---|
| 1077 | name text, |
|---|
| 1078 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1079 | PRIMARY KEY (id) |
|---|
| 1080 | ); |
|---|
| 1081 | |
|---|
| 1082 | CREATE TABLE mtb_product_list_max ( |
|---|
| 1083 | id smallint, |
|---|
| 1084 | name text, |
|---|
| 1085 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1086 | PRIMARY KEY (id) |
|---|
| 1087 | ); |
|---|
| 1088 | |
|---|
| 1089 | CREATE TABLE mtb_convenience ( |
|---|
| 1090 | id smallint, |
|---|
| 1091 | name text, |
|---|
| 1092 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1093 | PRIMARY KEY (id) |
|---|
| 1094 | ); |
|---|
| 1095 | |
|---|
| 1096 | CREATE TABLE mtb_conveni_message ( |
|---|
| 1097 | id smallint, |
|---|
| 1098 | name text, |
|---|
| 1099 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1100 | PRIMARY KEY (id) |
|---|
| 1101 | ); |
|---|
| 1102 | |
|---|
| 1103 | CREATE TABLE mtb_db ( |
|---|
| 1104 | id smallint, |
|---|
| 1105 | name text, |
|---|
| 1106 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1107 | PRIMARY KEY (id) |
|---|
| 1108 | ); |
|---|
| 1109 | |
|---|
| 1110 | CREATE TABLE mtb_target ( |
|---|
| 1111 | id smallint, |
|---|
| 1112 | name text, |
|---|
| 1113 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1114 | PRIMARY KEY (id) |
|---|
| 1115 | ); |
|---|
| 1116 | |
|---|
| 1117 | CREATE TABLE mtb_review_deny_url ( |
|---|
| 1118 | id smallint, |
|---|
| 1119 | name text, |
|---|
| 1120 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1121 | PRIMARY KEY (id) |
|---|
| 1122 | ); |
|---|
| 1123 | |
|---|
| 1124 | CREATE TABLE mtb_track_back_status ( |
|---|
| 1125 | id smallint, |
|---|
| 1126 | name text, |
|---|
| 1127 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1128 | PRIMARY KEY (id) |
|---|
| 1129 | ); |
|---|
| 1130 | |
|---|
| 1131 | CREATE TABLE mtb_site_control_track_back ( |
|---|
| 1132 | id smallint, |
|---|
| 1133 | name text, |
|---|
| 1134 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1135 | PRIMARY KEY (id) |
|---|
| 1136 | ); |
|---|
| 1137 | |
|---|
| 1138 | CREATE TABLE mtb_site_control_affiliate ( |
|---|
| 1139 | id smallint, |
|---|
| 1140 | name text, |
|---|
| 1141 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1142 | PRIMARY KEY (id) |
|---|
| 1143 | ); |
|---|
| 1144 | |
|---|
| 1145 | CREATE TABLE mtb_mobile_domain ( |
|---|
| 1146 | id smallint, |
|---|
| 1147 | name text, |
|---|
| 1148 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1149 | PRIMARY KEY (id) |
|---|
| 1150 | ); |
|---|
| 1151 | |
|---|
| 1152 | CREATE TABLE mtb_ownersstore_err ( |
|---|
| 1153 | id text, |
|---|
| 1154 | name text, |
|---|
| 1155 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1156 | PRIMARY KEY (id) |
|---|
| 1157 | ); |
|---|
| 1158 | |
|---|
| 1159 | CREATE TABLE mtb_ownersstore_ips ( |
|---|
| 1160 | id text, |
|---|
| 1161 | name text, |
|---|
| 1162 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1163 | PRIMARY KEY (id) |
|---|
| 1164 | ); |
|---|
| 1165 | |
|---|
| 1166 | CREATE TABLE mtb_constants ( |
|---|
| 1167 | id text, |
|---|
| 1168 | name text, |
|---|
| 1169 | rank smallint NOT NULL DEFAULT 0, |
|---|
| 1170 | remarks text, |
|---|
| 1171 | PRIMARY KEY (id) |
|---|
| 1172 | ); |
|---|
| 1173 | |
|---|
| 1174 | CREATE TABLE mtb_product_type ( |
|---|
| 1175 | id int2, |
|---|
| 1176 | name text, |
|---|
| 1177 | rank int2 NOT NULL, |
|---|
| 1178 | PRIMARY KEY (id) |
|---|
| 1179 | ); |
|---|
| 1180 | |
|---|
| 1181 | |
|---|
| 1182 | |
|---|
| 1183 | CREATE TABLE dtb_mobile_ext_session_id ( |
|---|
| 1184 | session_id text NOT NULL, |
|---|
| 1185 | param_key text, |
|---|
| 1186 | param_value text, |
|---|
| 1187 | url text, |
|---|
| 1188 | create_date timestamp NOT NULL DEFAULT now() |
|---|
| 1189 | ); |
|---|
| 1190 | |
|---|
| 1191 | CREATE TABLE dtb_mobile_kara_mail ( |
|---|
| 1192 | kara_mail_id int PRIMARY KEY, |
|---|
| 1193 | session_id text NOT NULL, |
|---|
| 1194 | token text NOT NULL, |
|---|
| 1195 | next_url text NOT NULL, |
|---|
| 1196 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 1197 | email text, |
|---|
| 1198 | receive_date timestamp |
|---|
| 1199 | ); |
|---|
| 1200 | |
|---|
| 1201 | CREATE TABLE dtb_session ( |
|---|
| 1202 | sess_id text NOT NULL, |
|---|
| 1203 | sess_data text, |
|---|
| 1204 | create_date timestamp NOT NULL, |
|---|
| 1205 | update_date timestamp NOT NULL, |
|---|
| 1206 | PRIMARY KEY (sess_id) |
|---|
| 1207 | ); |
|---|
| 1208 | |
|---|
| 1209 | CREATE TABLE dtb_module ( |
|---|
| 1210 | module_id int NOT NULL UNIQUE, |
|---|
| 1211 | module_code text NOT NULL, |
|---|
| 1212 | module_name text NOT NULL, |
|---|
| 1213 | sub_data text, |
|---|
| 1214 | auto_update_flg int2 NOT NULL DEFAULT 0, |
|---|
| 1215 | del_flg int2 NOT NULL DEFAULT 0, |
|---|
| 1216 | create_date timestamp NOT NULL DEFAULT NOW(), |
|---|
| 1217 | update_date timestamp NOT NULL |
|---|
| 1218 | ); |
|---|
| 1219 | |
|---|
| 1220 | CREATE TABLE dtb_site_control ( |
|---|
| 1221 | control_id int primary key NOT NULL, |
|---|
| 1222 | control_title text , |
|---|
| 1223 | control_text text , |
|---|
| 1224 | control_flg int2 NOT NULL DEFAULT 2, |
|---|
| 1225 | del_flg int2 NOT NULL DEFAULT 0, |
|---|
| 1226 | memo text , |
|---|
| 1227 | create_date timestamp NOT NULL DEFAULT now(), |
|---|
| 1228 | update_date timestamp NOT NULL DEFAULT now() |
|---|
| 1229 | ); |
|---|
| 1230 | |
|---|
| 1231 | CREATE TABLE dtb_trackback ( |
|---|
| 1232 | trackback_id int primary key NOT NULL, |
|---|
| 1233 | product_id int NOT NULL, |
|---|
| 1234 | blog_name varchar(255) NOT NULL DEFAULT '', |
|---|
| 1235 | title varchar(255) NOT NULL DEFAULT '', |
|---|
| 1236 | excerpt text NOT NULL DEFAULT '', |
|---|
| 1237 | url text NOT NULL DEFAULT '', |
|---|
| 1238 | status int2 NOT NULL DEFAULT 2, |
|---|
| 1239 | del_flg int2 NOT NULL DEFAULT 0, |
|---|
| 1240 | create_date timestamp NOT NULL, |
|---|
| 1241 | update_date timestamp NOT NULL |
|---|
| 1242 | ); |
|---|
| 1243 | |
|---|
| 1244 | CREATE TABLE dtb_bkup ( |
|---|
| 1245 | bkup_name varchar(50), |
|---|
| 1246 | bkup_memo text, |
|---|
| 1247 | create_date timestamp, |
|---|
| 1248 | PRIMARY KEY (bkup_name) |
|---|
| 1249 | ); |
|---|
| 1250 | |
|---|
| 1251 | CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id); |
|---|
| 1252 | CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id); |
|---|
| 1253 | CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id); |
|---|
| 1254 | CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id); |
|---|
| 1255 | |
|---|
| 1256 | CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key); |
|---|
| 1257 | CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value); |
|---|
| 1258 | CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url); |
|---|
| 1259 | CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date); |
|---|
| 1260 | |
|---|
| 1261 | CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token); |
|---|
| 1262 | CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date); |
|---|
| 1263 | CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date); |
|---|
| 1264 | |
|---|
| 1265 | CREATE TABLE "dtb_plugin" ( |
|---|
| 1266 | "plugin_id" int4 primary key NOT NULL, |
|---|
| 1267 | "plugin_name" varchar(255) DEFAULT NULL, |
|---|
| 1268 | "enable" int2 NOT NULL DEFAULT 0, |
|---|
| 1269 | "del_flg" int2 NOT NULL DEFAULT 0, |
|---|
| 1270 | "class_name" varchar(255) DEFAULT NULL, |
|---|
| 1271 | "create_date" timestamp(6) NOT NULL DEFAULT now(), |
|---|
| 1272 | "update_date" timestamp(6) NOT NULL DEFAULT now() |
|---|
| 1273 | ); |
|---|
| 1274 | |
|---|
| 1275 | CREATE TABLE dtb_index_list( |
|---|
| 1276 | table_name text NOT NULL DEFAULT '', |
|---|
| 1277 | column_name text NOT NULL DEFAULT '', |
|---|
| 1278 | recommend_flg int2 NOT NULL DEFAULT 0, |
|---|
| 1279 | recommend_comment text |
|---|
| 1280 | ); |
|---|