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