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