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 | confirm_url text, |
---|
162 | rank int, |
---|
163 | status smallint NOT NULL DEFAULT 1, |
---|
164 | del_flg smallint NOT NULL DEFAULT 0, |
---|
165 | creator_id int NOT NULL, |
---|
166 | create_date timestamp NOT NULL DEFAULT now(), |
---|
167 | update_date timestamp NOT NULL, |
---|
168 | PRIMARY KEY (deliv_id) |
---|
169 | ); |
---|
170 | |
---|
171 | CREATE TABLE dtb_delivtime ( |
---|
172 | deliv_id int NOT NULL, |
---|
173 | time_id int NOT NULL, |
---|
174 | deliv_time text NOT NULL, |
---|
175 | PRIMARY KEY (deliv_id, time_id) |
---|
176 | ); |
---|
177 | |
---|
178 | CREATE TABLE dtb_delivfee ( |
---|
179 | deliv_id int NOT NULL, |
---|
180 | fee_id int NOT NULL, |
---|
181 | fee numeric NOT NULL, |
---|
182 | pref smallint, |
---|
183 | PRIMARY KEY (deliv_id, fee_id) |
---|
184 | ); |
---|
185 | |
---|
186 | CREATE TABLE dtb_payment ( |
---|
187 | payment_id int NOT NULL, |
---|
188 | payment_method text, |
---|
189 | charge numeric, |
---|
190 | rule numeric, |
---|
191 | rank int, |
---|
192 | note text, |
---|
193 | fix smallint, |
---|
194 | status smallint NOT NULL DEFAULT 1, |
---|
195 | del_flg smallint NOT NULL DEFAULT 0, |
---|
196 | creator_id int NOT NULL, |
---|
197 | create_date timestamp NOT NULL DEFAULT now(), |
---|
198 | update_date timestamp NOT NULL, |
---|
199 | payment_image text, |
---|
200 | upper_rule numeric, |
---|
201 | charge_flg smallint DEFAULT 1, |
---|
202 | rule_min numeric, |
---|
203 | upper_rule_max numeric, |
---|
204 | module_id int, |
---|
205 | module_path text, |
---|
206 | memo01 text, |
---|
207 | memo02 text, |
---|
208 | memo03 text, |
---|
209 | memo04 text, |
---|
210 | memo05 text, |
---|
211 | memo06 text, |
---|
212 | memo07 text, |
---|
213 | memo08 text, |
---|
214 | memo09 text, |
---|
215 | memo10 text, |
---|
216 | PRIMARY KEY (payment_id) |
---|
217 | ); |
---|
218 | |
---|
219 | CREATE TABLE dtb_payment_options ( |
---|
220 | product_class_id int NOT NULL, |
---|
221 | payment_id int NOT NULL, |
---|
222 | rank int, |
---|
223 | PRIMARY KEY(product_class_id, payment_id) |
---|
224 | ); |
---|
225 | |
---|
226 | CREATE TABLE dtb_mailtemplate ( |
---|
227 | template_id int NOT NULL, |
---|
228 | subject text, |
---|
229 | header text, |
---|
230 | footer text, |
---|
231 | creator_id int NOT NULL, |
---|
232 | del_flg smallint NOT NULL DEFAULT 0, |
---|
233 | create_date timestamp NOT NULL DEFAULT now(), |
---|
234 | update_date timestamp NOT NULL |
---|
235 | ); |
---|
236 | |
---|
237 | CREATE TABLE dtb_mailmaga_template ( |
---|
238 | template_id int NOT NULL, |
---|
239 | subject text, |
---|
240 | charge_image 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_fee numeric, |
---|
626 | charge numeric, |
---|
627 | use_point numeric, |
---|
628 | add_point numeric, |
---|
629 | birth_point numeric DEFAULT 0, |
---|
630 | tax numeric, |
---|
631 | total numeric, |
---|
632 | payment_total numeric, |
---|
633 | payment_id int, |
---|
634 | payment_method text, |
---|
635 | note text, |
---|
636 | status smallint, |
---|
637 | create_date timestamp NOT NULL DEFAULT now(), |
---|
638 | update_date timestamp NOT NULL, |
---|
639 | commit_date timestamp, |
---|
640 | payment_date timestamp, |
---|
641 | device_type_id int, |
---|
642 | del_flg smallint NOT NULL DEFAULT 0, |
---|
643 | memo01 text, |
---|
644 | memo02 text, |
---|
645 | memo03 text, |
---|
646 | memo04 text, |
---|
647 | memo05 text, |
---|
648 | memo06 text, |
---|
649 | memo07 text, |
---|
650 | memo08 text, |
---|
651 | memo09 text, |
---|
652 | memo10 text, |
---|
653 | PRIMARY KEY (order_id) |
---|
654 | ); |
---|
655 | |
---|
656 | CREATE TABLE dtb_order_temp ( |
---|
657 | order_temp_id text NOT NULL, |
---|
658 | customer_id int NOT NULL, |
---|
659 | message text, |
---|
660 | order_name01 text, |
---|
661 | order_name02 text, |
---|
662 | order_kana01 text, |
---|
663 | order_kana02 text, |
---|
664 | order_email text, |
---|
665 | order_tel01 text, |
---|
666 | order_tel02 text, |
---|
667 | order_tel03 text, |
---|
668 | order_fax01 text, |
---|
669 | order_fax02 text, |
---|
670 | order_fax03 text, |
---|
671 | order_zip01 text, |
---|
672 | order_zip02 text, |
---|
673 | order_pref smallint, |
---|
674 | order_addr01 text, |
---|
675 | order_addr02 text, |
---|
676 | order_sex smallint, |
---|
677 | order_birth timestamp, |
---|
678 | order_job int, |
---|
679 | subtotal numeric, |
---|
680 | discount numeric, |
---|
681 | deliv_fee numeric, |
---|
682 | charge numeric, |
---|
683 | use_point numeric, |
---|
684 | add_point numeric, |
---|
685 | birth_point numeric DEFAULT 0, |
---|
686 | tax numeric, |
---|
687 | total numeric, |
---|
688 | payment_total numeric, |
---|
689 | payment_id int, |
---|
690 | payment_method text, |
---|
691 | note text, |
---|
692 | mail_flag smallint, |
---|
693 | status smallint, |
---|
694 | deliv_check smallint, |
---|
695 | point_check smallint, |
---|
696 | create_date timestamp NOT NULL DEFAULT now(), |
---|
697 | update_date timestamp NOT NULL, |
---|
698 | device_type_id int, |
---|
699 | del_flg smallint NOT NULL DEFAULT 0, |
---|
700 | order_id int, |
---|
701 | memo01 text, |
---|
702 | memo02 text, |
---|
703 | memo03 text, |
---|
704 | memo04 text, |
---|
705 | memo05 text, |
---|
706 | memo06 text, |
---|
707 | memo07 text, |
---|
708 | memo08 text, |
---|
709 | memo09 text, |
---|
710 | memo10 text, |
---|
711 | session text |
---|
712 | ); |
---|
713 | |
---|
714 | CREATE TABLE dtb_shipping ( |
---|
715 | shipping_id int NOT NULL, |
---|
716 | order_id int NOT NULL, |
---|
717 | shipping_name01 text, |
---|
718 | shipping_name02 text, |
---|
719 | shipping_kana01 text, |
---|
720 | shipping_kana02 text, |
---|
721 | shipping_tel01 text, |
---|
722 | shipping_tel02 text, |
---|
723 | shipping_tel03 text, |
---|
724 | shipping_fax01 text, |
---|
725 | shipping_fax02 text, |
---|
726 | shipping_fax03 text, |
---|
727 | shipping_pref smallint, |
---|
728 | shipping_zip01 text, |
---|
729 | shipping_zip02 text, |
---|
730 | shipping_addr01 text, |
---|
731 | shipping_addr02 text, |
---|
732 | deliv_id int NOT NULL, |
---|
733 | time_id int, |
---|
734 | shipping_time text, |
---|
735 | shipping_num text, |
---|
736 | shipping_date timestamp, |
---|
737 | shipping_commit_date timestamp, |
---|
738 | rank int, |
---|
739 | create_date timestamp NOT NULL DEFAULT now(), |
---|
740 | update_date timestamp NOT NULL, |
---|
741 | del_flg smallint NOT NULL DEFAULT 0, |
---|
742 | PRIMARY KEY (shipping_id, order_id) |
---|
743 | ); |
---|
744 | |
---|
745 | CREATE TABLE dtb_shipment_item ( |
---|
746 | shipping_id int NOT NULL, |
---|
747 | product_class_id int NOT NULL, |
---|
748 | order_id int NOT NULL, |
---|
749 | product_name text NOT NULL, |
---|
750 | product_code text, |
---|
751 | classcategory_name1 text, |
---|
752 | classcategory_name2 text, |
---|
753 | price numeric, |
---|
754 | quantity numeric, |
---|
755 | PRIMARY KEY (shipping_id, product_class_id, order_id) |
---|
756 | ); |
---|
757 | |
---|
758 | CREATE TABLE dtb_other_deliv ( |
---|
759 | other_deliv_id int NOT NULL, |
---|
760 | customer_id int NOT NULL, |
---|
761 | name01 text, |
---|
762 | name02 text, |
---|
763 | kana01 text, |
---|
764 | kana02 text, |
---|
765 | zip01 text, |
---|
766 | zip02 text, |
---|
767 | pref smallint, |
---|
768 | addr01 text, |
---|
769 | addr02 text, |
---|
770 | tel01 text, |
---|
771 | tel02 text, |
---|
772 | tel03 text, |
---|
773 | PRIMARY KEY (other_deliv_id) |
---|
774 | ); |
---|
775 | |
---|
776 | CREATE TABLE dtb_order_detail ( |
---|
777 | order_id int NOT NULL, |
---|
778 | product_id int NOT NULL, |
---|
779 | product_class_id int NOT NULL, |
---|
780 | product_name text NOT NULL, |
---|
781 | product_code text, |
---|
782 | classcategory_name1 text, |
---|
783 | classcategory_name2 text, |
---|
784 | price numeric, |
---|
785 | quantity numeric, |
---|
786 | point_rate numeric |
---|
787 | ); |
---|
788 | |
---|
789 | CREATE TABLE dtb_member ( |
---|
790 | member_id int NOT NULL, |
---|
791 | name text, |
---|
792 | department text, |
---|
793 | login_id text NOT NULL, |
---|
794 | password text NOT NULL, |
---|
795 | salt text NOT NULL, |
---|
796 | authority smallint NOT NULL, |
---|
797 | rank int NOT NULL DEFAULT 0, |
---|
798 | work smallint NOT NULL DEFAULT 1, |
---|
799 | del_flg smallint NOT NULL DEFAULT 0, |
---|
800 | creator_id int NOT NULL, |
---|
801 | create_date timestamp NOT NULL DEFAULT now(), |
---|
802 | update_date timestamp NOT NULL, |
---|
803 | login_date timestamp, |
---|
804 | PRIMARY KEY (member_id) |
---|
805 | ); |
---|
806 | |
---|
807 | CREATE TABLE dtb_bat_relate_products ( |
---|
808 | product_id int, |
---|
809 | relate_product_id int, |
---|
810 | customer_id int, |
---|
811 | create_date timestamp NOT NULL DEFAULT now() |
---|
812 | ); |
---|
813 | |
---|
814 | CREATE TABLE dtb_pagelayout ( |
---|
815 | device_type_id int NOT NULL, |
---|
816 | page_id int NOT NULL, |
---|
817 | page_name text, |
---|
818 | url text NOT NULL, |
---|
819 | filename text, |
---|
820 | header_chk smallint DEFAULT 1, |
---|
821 | footer_chk smallint DEFAULT 1, |
---|
822 | edit_flg smallint DEFAULT 1, |
---|
823 | author text, |
---|
824 | description text, |
---|
825 | keyword text, |
---|
826 | update_url text, |
---|
827 | create_date timestamp NOT NULL DEFAULT now(), |
---|
828 | update_date timestamp NOT NULL, |
---|
829 | PRIMARY KEY (device_type_id, page_id) |
---|
830 | ); |
---|
831 | |
---|
832 | CREATE TABLE dtb_bloc ( |
---|
833 | device_type_id int NOT NULL, |
---|
834 | bloc_id int NOT NULL, |
---|
835 | bloc_name text, |
---|
836 | tpl_path text, |
---|
837 | filename text NOT NULL, |
---|
838 | create_date timestamp NOT NULL DEFAULT now(), |
---|
839 | update_date timestamp NOT NULL, |
---|
840 | php_path text, |
---|
841 | deletable_flg smallint NOT NULL DEFAULT 1, |
---|
842 | PRIMARY KEY (device_type_id, bloc_id), |
---|
843 | UNIQUE (device_type_id, filename) |
---|
844 | ); |
---|
845 | |
---|
846 | CREATE TABLE dtb_blocposition ( |
---|
847 | device_type_id int NOT NULL, |
---|
848 | page_id int NOT NULL, |
---|
849 | target_id int, |
---|
850 | bloc_id int, |
---|
851 | bloc_row int, |
---|
852 | anywhere smallint DEFAULT 0 NOT NULL, |
---|
853 | PRIMARY KEY (device_type_id, page_id, target_id, bloc_id) |
---|
854 | ); |
---|
855 | |
---|
856 | CREATE TABLE dtb_csv ( |
---|
857 | no int, |
---|
858 | csv_id int NOT NULL, |
---|
859 | col text, |
---|
860 | disp_name text, |
---|
861 | rank int, |
---|
862 | rw_flg smallint DEFAULT 1, |
---|
863 | status smallint NOT NULL DEFAULT 1, |
---|
864 | create_date timestamp NOT NULL DEFAULT now(), |
---|
865 | update_date timestamp NOT NULL, |
---|
866 | mb_convert_kana_option text, |
---|
867 | size_const_type text, |
---|
868 | error_check_types text, |
---|
869 | PRIMARY KEY (no) |
---|
870 | ); |
---|
871 | |
---|
872 | CREATE TABLE dtb_csv_sql ( |
---|
873 | sql_id int, |
---|
874 | sql_name text NOT NULL, |
---|
875 | csv_sql text, |
---|
876 | create_date timestamp NOT NULL DEFAULT now(), |
---|
877 | update_date timestamp NOT NULL, |
---|
878 | PRIMARY KEY (sql_id) |
---|
879 | ); |
---|
880 | |
---|
881 | CREATE TABLE dtb_templates ( |
---|
882 | template_code text NOT NULL, |
---|
883 | device_type_id int NOT NULL, |
---|
884 | template_name text, |
---|
885 | create_date timestamp NOT NULL DEFAULT now(), |
---|
886 | update_date timestamp NOT NULL, |
---|
887 | PRIMARY KEY (template_code) |
---|
888 | ); |
---|
889 | |
---|
890 | CREATE TABLE dtb_table_comment ( |
---|
891 | id int, |
---|
892 | table_name text, |
---|
893 | column_name text, |
---|
894 | description text, |
---|
895 | PRIMARY KEY (id) |
---|
896 | ); |
---|
897 | |
---|
898 | CREATE TABLE dtb_maker ( |
---|
899 | maker_id int NOT NULL, |
---|
900 | name text NOT NULL, |
---|
901 | rank int NOT NULL DEFAULT 0, |
---|
902 | creator_id int NOT NULL, |
---|
903 | create_date timestamp NOT NULL DEFAULT now(), |
---|
904 | update_date timestamp NOT NULL, |
---|
905 | del_flg smallint NOT NULL DEFAULT 0, |
---|
906 | PRIMARY KEY (maker_id) |
---|
907 | ); |
---|
908 | |
---|
909 | CREATE TABLE dtb_maker_count ( |
---|
910 | maker_id int NOT NULL, |
---|
911 | product_count int NOT NULL, |
---|
912 | create_date timestamp NOT NULL DEFAULT now() |
---|
913 | ); |
---|
914 | |
---|
915 | CREATE TABLE mtb_pref ( |
---|
916 | id smallint, |
---|
917 | name text, |
---|
918 | rank smallint NOT NULL DEFAULT 0, |
---|
919 | PRIMARY KEY (id) |
---|
920 | ); |
---|
921 | |
---|
922 | CREATE TABLE mtb_permission ( |
---|
923 | id text, |
---|
924 | name text, |
---|
925 | rank smallint NOT NULL DEFAULT 0, |
---|
926 | PRIMARY KEY (id) |
---|
927 | ); |
---|
928 | |
---|
929 | CREATE TABLE mtb_disable_logout ( |
---|
930 | id smallint, |
---|
931 | name text, |
---|
932 | rank smallint NOT NULL DEFAULT 0, |
---|
933 | PRIMARY KEY (id) |
---|
934 | ); |
---|
935 | |
---|
936 | CREATE TABLE mtb_authority ( |
---|
937 | id smallint, |
---|
938 | name text, |
---|
939 | rank smallint NOT NULL DEFAULT 0, |
---|
940 | PRIMARY KEY (id) |
---|
941 | ); |
---|
942 | |
---|
943 | CREATE TABLE mtb_work ( |
---|
944 | id smallint, |
---|
945 | name text, |
---|
946 | rank smallint NOT NULL DEFAULT 0, |
---|
947 | PRIMARY KEY (id) |
---|
948 | ); |
---|
949 | |
---|
950 | CREATE TABLE mtb_disp ( |
---|
951 | id smallint, |
---|
952 | name text, |
---|
953 | rank smallint NOT NULL DEFAULT 0, |
---|
954 | PRIMARY KEY (id) |
---|
955 | ); |
---|
956 | |
---|
957 | CREATE TABLE mtb_class ( |
---|
958 | id smallint, |
---|
959 | name text, |
---|
960 | rank smallint NOT NULL DEFAULT 0, |
---|
961 | PRIMARY KEY (id) |
---|
962 | ); |
---|
963 | |
---|
964 | CREATE TABLE mtb_status ( |
---|
965 | id smallint, |
---|
966 | name text, |
---|
967 | rank smallint NOT NULL DEFAULT 0, |
---|
968 | PRIMARY KEY (id) |
---|
969 | ); |
---|
970 | |
---|
971 | CREATE TABLE mtb_status_image ( |
---|
972 | id smallint, |
---|
973 | name text, |
---|
974 | rank smallint NOT NULL DEFAULT 0, |
---|
975 | PRIMARY KEY (id) |
---|
976 | ); |
---|
977 | |
---|
978 | CREATE TABLE mtb_allowed_tag ( |
---|
979 | id smallint, |
---|
980 | name text, |
---|
981 | rank smallint NOT NULL DEFAULT 0, |
---|
982 | PRIMARY KEY (id) |
---|
983 | ); |
---|
984 | |
---|
985 | CREATE TABLE mtb_page_max ( |
---|
986 | id smallint, |
---|
987 | name text, |
---|
988 | rank smallint NOT NULL DEFAULT 0, |
---|
989 | PRIMARY KEY (id) |
---|
990 | ); |
---|
991 | |
---|
992 | CREATE TABLE mtb_magazine_type ( |
---|
993 | id smallint, |
---|
994 | name text, |
---|
995 | rank smallint NOT NULL DEFAULT 0, |
---|
996 | PRIMARY KEY (id) |
---|
997 | ); |
---|
998 | |
---|
999 | CREATE TABLE mtb_mail_magazine_type ( |
---|
1000 | id smallint, |
---|
1001 | name text, |
---|
1002 | rank smallint NOT NULL DEFAULT 0, |
---|
1003 | PRIMARY KEY (id) |
---|
1004 | ); |
---|
1005 | |
---|
1006 | CREATE TABLE mtb_recommend ( |
---|
1007 | id smallint, |
---|
1008 | name text, |
---|
1009 | rank smallint NOT NULL DEFAULT 0, |
---|
1010 | PRIMARY KEY (id) |
---|
1011 | ); |
---|
1012 | |
---|
1013 | CREATE TABLE mtb_taxrule ( |
---|
1014 | id smallint, |
---|
1015 | name text, |
---|
1016 | rank smallint NOT NULL DEFAULT 0, |
---|
1017 | PRIMARY KEY (id) |
---|
1018 | ); |
---|
1019 | |
---|
1020 | CREATE TABLE mtb_mail_template ( |
---|
1021 | id smallint, |
---|
1022 | name text, |
---|
1023 | rank smallint NOT NULL DEFAULT 0, |
---|
1024 | PRIMARY KEY (id) |
---|
1025 | ); |
---|
1026 | |
---|
1027 | CREATE TABLE mtb_mail_tpl_path ( |
---|
1028 | id smallint, |
---|
1029 | name text, |
---|
1030 | rank smallint NOT NULL DEFAULT 0, |
---|
1031 | PRIMARY KEY (id) |
---|
1032 | ); |
---|
1033 | |
---|
1034 | CREATE TABLE mtb_job ( |
---|
1035 | id smallint, |
---|
1036 | name text, |
---|
1037 | rank smallint NOT NULL DEFAULT 0, |
---|
1038 | PRIMARY KEY (id) |
---|
1039 | ); |
---|
1040 | |
---|
1041 | CREATE TABLE mtb_reminder ( |
---|
1042 | id smallint, |
---|
1043 | name text, |
---|
1044 | rank smallint NOT NULL DEFAULT 0, |
---|
1045 | PRIMARY KEY (id) |
---|
1046 | ); |
---|
1047 | |
---|
1048 | CREATE TABLE mtb_sex ( |
---|
1049 | id smallint, |
---|
1050 | name text, |
---|
1051 | rank smallint NOT NULL DEFAULT 0, |
---|
1052 | PRIMARY KEY (id) |
---|
1053 | ); |
---|
1054 | |
---|
1055 | CREATE TABLE mtb_page_rows ( |
---|
1056 | id smallint, |
---|
1057 | name text, |
---|
1058 | rank smallint NOT NULL DEFAULT 0, |
---|
1059 | PRIMARY KEY (id) |
---|
1060 | ); |
---|
1061 | |
---|
1062 | CREATE TABLE mtb_mail_type ( |
---|
1063 | id smallint, |
---|
1064 | name text, |
---|
1065 | rank smallint NOT NULL DEFAULT 0, |
---|
1066 | PRIMARY KEY (id) |
---|
1067 | ); |
---|
1068 | |
---|
1069 | CREATE TABLE mtb_order_status ( |
---|
1070 | id smallint, |
---|
1071 | name text, |
---|
1072 | rank smallint NOT NULL DEFAULT 0, |
---|
1073 | PRIMARY KEY (id) |
---|
1074 | ); |
---|
1075 | |
---|
1076 | CREATE TABLE mtb_product_status_color ( |
---|
1077 | id smallint, |
---|
1078 | name text, |
---|
1079 | rank smallint NOT NULL DEFAULT 0, |
---|
1080 | PRIMARY KEY (id) |
---|
1081 | ); |
---|
1082 | |
---|
1083 | CREATE TABLE mtb_order_status_color ( |
---|
1084 | id smallint, |
---|
1085 | name text, |
---|
1086 | rank smallint NOT NULL DEFAULT 0, |
---|
1087 | PRIMARY KEY (id) |
---|
1088 | ); |
---|
1089 | |
---|
1090 | CREATE TABLE mtb_wday ( |
---|
1091 | id smallint, |
---|
1092 | name text, |
---|
1093 | rank smallint NOT NULL DEFAULT 0, |
---|
1094 | PRIMARY KEY (id) |
---|
1095 | ); |
---|
1096 | |
---|
1097 | CREATE TABLE mtb_delivery_date ( |
---|
1098 | id smallint, |
---|
1099 | name text, |
---|
1100 | rank smallint NOT NULL DEFAULT 0, |
---|
1101 | PRIMARY KEY (id) |
---|
1102 | ); |
---|
1103 | |
---|
1104 | CREATE TABLE mtb_product_list_max ( |
---|
1105 | id smallint, |
---|
1106 | name text, |
---|
1107 | rank smallint NOT NULL DEFAULT 0, |
---|
1108 | PRIMARY KEY (id) |
---|
1109 | ); |
---|
1110 | |
---|
1111 | CREATE TABLE mtb_convenience ( |
---|
1112 | id smallint, |
---|
1113 | name text, |
---|
1114 | rank smallint NOT NULL DEFAULT 0, |
---|
1115 | PRIMARY KEY (id) |
---|
1116 | ); |
---|
1117 | |
---|
1118 | CREATE TABLE mtb_conveni_message ( |
---|
1119 | id smallint, |
---|
1120 | name text, |
---|
1121 | rank smallint NOT NULL DEFAULT 0, |
---|
1122 | PRIMARY KEY (id) |
---|
1123 | ); |
---|
1124 | |
---|
1125 | CREATE TABLE mtb_db ( |
---|
1126 | id smallint, |
---|
1127 | name text, |
---|
1128 | rank smallint NOT NULL DEFAULT 0, |
---|
1129 | PRIMARY KEY (id) |
---|
1130 | ); |
---|
1131 | |
---|
1132 | CREATE TABLE mtb_target ( |
---|
1133 | id smallint, |
---|
1134 | name text, |
---|
1135 | rank smallint NOT NULL DEFAULT 0, |
---|
1136 | PRIMARY KEY (id) |
---|
1137 | ); |
---|
1138 | |
---|
1139 | CREATE TABLE mtb_review_deny_url ( |
---|
1140 | id smallint, |
---|
1141 | name text, |
---|
1142 | rank smallint NOT NULL DEFAULT 0, |
---|
1143 | PRIMARY KEY (id) |
---|
1144 | ); |
---|
1145 | |
---|
1146 | CREATE TABLE mtb_track_back_status ( |
---|
1147 | id smallint, |
---|
1148 | name text, |
---|
1149 | rank smallint NOT NULL DEFAULT 0, |
---|
1150 | PRIMARY KEY (id) |
---|
1151 | ); |
---|
1152 | |
---|
1153 | CREATE TABLE mtb_site_control_track_back ( |
---|
1154 | id smallint, |
---|
1155 | name text, |
---|
1156 | rank smallint NOT NULL DEFAULT 0, |
---|
1157 | PRIMARY KEY (id) |
---|
1158 | ); |
---|
1159 | |
---|
1160 | CREATE TABLE mtb_site_control_affiliate ( |
---|
1161 | id smallint, |
---|
1162 | name text, |
---|
1163 | rank smallint NOT NULL DEFAULT 0, |
---|
1164 | PRIMARY KEY (id) |
---|
1165 | ); |
---|
1166 | |
---|
1167 | CREATE TABLE mtb_mobile_domain ( |
---|
1168 | id smallint, |
---|
1169 | name text, |
---|
1170 | rank smallint NOT NULL DEFAULT 0, |
---|
1171 | PRIMARY KEY (id) |
---|
1172 | ); |
---|
1173 | |
---|
1174 | CREATE TABLE mtb_ownersstore_err ( |
---|
1175 | id smallint, |
---|
1176 | name text, |
---|
1177 | rank smallint NOT NULL DEFAULT 0, |
---|
1178 | PRIMARY KEY (id) |
---|
1179 | ); |
---|
1180 | |
---|
1181 | CREATE TABLE mtb_ownersstore_ips ( |
---|
1182 | id smallint, |
---|
1183 | name text, |
---|
1184 | rank smallint NOT NULL DEFAULT 0, |
---|
1185 | PRIMARY KEY (id) |
---|
1186 | ); |
---|
1187 | |
---|
1188 | CREATE TABLE mtb_constants ( |
---|
1189 | id text, |
---|
1190 | name text, |
---|
1191 | rank smallint NOT NULL DEFAULT 0, |
---|
1192 | remarks text, |
---|
1193 | PRIMARY KEY (id) |
---|
1194 | ); |
---|
1195 | |
---|
1196 | CREATE TABLE mtb_product_type ( |
---|
1197 | id smallint, |
---|
1198 | name text, |
---|
1199 | rank smallint NOT NULL, |
---|
1200 | PRIMARY KEY (id) |
---|
1201 | ); |
---|
1202 | |
---|
1203 | CREATE TABLE mtb_device_type ( |
---|
1204 | id smallint, |
---|
1205 | name text, |
---|
1206 | rank smallint NOT NULL, |
---|
1207 | PRIMARY KEY (id) |
---|
1208 | ); |
---|
1209 | |
---|
1210 | CREATE TABLE dtb_mobile_ext_session_id ( |
---|
1211 | session_id text NOT NULL, |
---|
1212 | param_key text, |
---|
1213 | param_value text, |
---|
1214 | url text, |
---|
1215 | create_date timestamp NOT NULL DEFAULT now() |
---|
1216 | ); |
---|
1217 | |
---|
1218 | CREATE TABLE dtb_mobile_kara_mail ( |
---|
1219 | kara_mail_id int PRIMARY KEY, |
---|
1220 | session_id text NOT NULL, |
---|
1221 | token text NOT NULL, |
---|
1222 | next_url text NOT NULL, |
---|
1223 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1224 | email text, |
---|
1225 | receive_date timestamp |
---|
1226 | ); |
---|
1227 | |
---|
1228 | CREATE TABLE dtb_module ( |
---|
1229 | module_id int NOT NULL UNIQUE, |
---|
1230 | module_code text NOT NULL, |
---|
1231 | module_name text NOT NULL, |
---|
1232 | sub_data text, |
---|
1233 | auto_update_flg smallint NOT NULL DEFAULT 0, |
---|
1234 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1235 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1236 | update_date timestamp NOT NULL |
---|
1237 | ); |
---|
1238 | |
---|
1239 | CREATE TABLE dtb_session ( |
---|
1240 | sess_id text NOT NULL, |
---|
1241 | sess_data text, |
---|
1242 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1243 | update_date timestamp NOT NULL, |
---|
1244 | PRIMARY KEY (sess_id) |
---|
1245 | ); |
---|
1246 | |
---|
1247 | CREATE TABLE dtb_site_control ( |
---|
1248 | control_id int NOT NULL, |
---|
1249 | control_title text, |
---|
1250 | control_text text, |
---|
1251 | control_flg smallint NOT NULL DEFAULT 2, |
---|
1252 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1253 | memo text, |
---|
1254 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1255 | update_date timestamp NOT NULL, |
---|
1256 | PRIMARY KEY (control_id) |
---|
1257 | ); |
---|
1258 | |
---|
1259 | CREATE TABLE dtb_trackback ( |
---|
1260 | trackback_id int NOT NULL, |
---|
1261 | product_id int NOT NULL, |
---|
1262 | blog_name text NOT NULL, |
---|
1263 | title text NOT NULL, |
---|
1264 | excerpt text NOT NULL, |
---|
1265 | url text NOT NULL, |
---|
1266 | status smallint NOT NULL DEFAULT 2, |
---|
1267 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1268 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1269 | update_date timestamp NOT NULL, |
---|
1270 | PRIMARY KEY (trackback_id) |
---|
1271 | ); |
---|
1272 | |
---|
1273 | CREATE TABLE dtb_bkup ( |
---|
1274 | bkup_name text, |
---|
1275 | bkup_memo text, |
---|
1276 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1277 | PRIMARY KEY (bkup_name) |
---|
1278 | ); |
---|
1279 | |
---|
1280 | CREATE TABLE dtb_plugin ( |
---|
1281 | plugin_id int NOT NULL, |
---|
1282 | plugin_name text NOT NULL, |
---|
1283 | enable smallint NOT NULL DEFAULT 0, |
---|
1284 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1285 | class_name text NOT NULL, |
---|
1286 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1287 | update_date timestamp NOT NULL, |
---|
1288 | PRIMARY KEY (plugin_id) |
---|
1289 | ); |
---|
1290 | |
---|
1291 | CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id); |
---|
1292 | CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id); |
---|
1293 | CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id); |
---|
1294 | CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id); |
---|
1295 | CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key); |
---|
1296 | CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value); |
---|
1297 | CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url); |
---|
1298 | CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date); |
---|
1299 | CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token); |
---|
1300 | CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date); |
---|
1301 | CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date); |
---|
1302 | |
---|
1303 | CREATE TABLE dtb_index_list ( |
---|
1304 | table_name text NOT NULL DEFAULT '', |
---|
1305 | column_name text NOT NULL DEFAULT '', |
---|
1306 | recommend_flg smallint NOT NULL DEFAULT 0, |
---|
1307 | recommend_comment text, |
---|
1308 | PRIMARY KEY (table_name, column_name) |
---|
1309 | ); |
---|