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