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