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 DEFAULT now(), |
---|
68 | create_date timestamp NOT NULL DEFAULT now() |
---|
69 | ); |
---|
70 | |
---|
71 | CREATE TABLE dtb_update ( |
---|
72 | module_id int NOT NULL, |
---|
73 | module_name text NOT NULL, |
---|
74 | now_version text, |
---|
75 | latest_version text NOT NULL, |
---|
76 | module_explain text, |
---|
77 | main_php text NOT NULL, |
---|
78 | extern_php text NOT NULL, |
---|
79 | install_sql text, |
---|
80 | uninstall_sql text, |
---|
81 | other_files text, |
---|
82 | del_flg smallint NOT NULL DEFAULT 0, |
---|
83 | create_date timestamp NOT NULL DEFAULT now(), |
---|
84 | update_date timestamp 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 | |
---|
427 | CREATE TABLE dtb_bat_order_daily ( |
---|
428 | total_order numeric NOT NULL DEFAULT 0, |
---|
429 | member numeric NOT NULL DEFAULT 0, |
---|
430 | nonmember numeric NOT NULL DEFAULT 0, |
---|
431 | men numeric NOT NULL DEFAULT 0, |
---|
432 | women numeric NOT NULL DEFAULT 0, |
---|
433 | men_member numeric NOT NULL DEFAULT 0, |
---|
434 | men_nonmember numeric NOT NULL DEFAULT 0, |
---|
435 | women_member numeric NOT NULL DEFAULT 0, |
---|
436 | women_nonmember numeric NOT NULL DEFAULT 0, |
---|
437 | total numeric NOT NULL DEFAULT 0, |
---|
438 | total_average numeric NOT NULL DEFAULT 0, |
---|
439 | order_date timestamp NOT NULL DEFAULT now(), |
---|
440 | create_date timestamp NOT NULL DEFAULT now(), |
---|
441 | year smallint NOT NULL, |
---|
442 | month smallint NOT NULL, |
---|
443 | day smallint NOT NULL, |
---|
444 | wday smallint NOT NULL, |
---|
445 | key_day text NOT NULL, |
---|
446 | key_month text NOT NULL, |
---|
447 | key_year text NOT NULL, |
---|
448 | key_wday text NOT NULL |
---|
449 | ); |
---|
450 | |
---|
451 | CREATE TABLE dtb_bat_order_daily_hour ( |
---|
452 | total_order numeric NOT NULL DEFAULT 0, |
---|
453 | member numeric NOT NULL DEFAULT 0, |
---|
454 | nonmember numeric NOT NULL DEFAULT 0, |
---|
455 | men numeric NOT NULL DEFAULT 0, |
---|
456 | women numeric NOT NULL DEFAULT 0, |
---|
457 | men_member numeric NOT NULL DEFAULT 0, |
---|
458 | men_nonmember numeric NOT NULL DEFAULT 0, |
---|
459 | women_member numeric NOT NULL DEFAULT 0, |
---|
460 | women_nonmember numeric NOT NULL DEFAULT 0, |
---|
461 | total numeric NOT NULL DEFAULT 0, |
---|
462 | total_average numeric NOT NULL DEFAULT 0, |
---|
463 | hour smallint NOT NULL DEFAULT 0, |
---|
464 | order_date timestamp DEFAULT now(), |
---|
465 | create_date timestamp NOT NULL DEFAULT now() |
---|
466 | ); |
---|
467 | |
---|
468 | CREATE TABLE dtb_recommend_products ( |
---|
469 | product_id int NOT NULL, |
---|
470 | recommend_product_id int NOT NULL, |
---|
471 | rank int NOT NULL, |
---|
472 | comment text, |
---|
473 | status smallint NOT NULL DEFAULT 0, |
---|
474 | creator_id int NOT NULL, |
---|
475 | create_date timestamp NOT NULL DEFAULT now(), |
---|
476 | update_date timestamp NOT NULL |
---|
477 | ); |
---|
478 | |
---|
479 | CREATE TABLE dtb_review ( |
---|
480 | review_id int NOT NULL, |
---|
481 | product_id int NOT NULL, |
---|
482 | reviewer_name text NOT NULL, |
---|
483 | reviewer_url text, |
---|
484 | sex smallint, |
---|
485 | customer_id int, |
---|
486 | recommend_level smallint NOT NULL, |
---|
487 | title text NOT NULL, |
---|
488 | comment text NOT NULL, |
---|
489 | status smallint DEFAULT 2, |
---|
490 | creator_id int NOT NULL, |
---|
491 | create_date timestamp NOT NULL DEFAULT now(), |
---|
492 | update_date timestamp NOT NULL, |
---|
493 | del_flg smallint NOT NULL DEFAULT 0, |
---|
494 | PRIMARY KEY (review_id) |
---|
495 | ); |
---|
496 | |
---|
497 | CREATE TABLE dtb_customer_favorite_products ( |
---|
498 | customer_id int NOT NULL, |
---|
499 | product_id int NOT NULL, |
---|
500 | create_date timestamp NOT NULL DEFAULT now(), |
---|
501 | update_date timestamp NOT NULL, |
---|
502 | PRIMARY KEY (customer_id, product_id) |
---|
503 | ); |
---|
504 | |
---|
505 | CREATE TABLE dtb_category_count ( |
---|
506 | category_id int NOT NULL, |
---|
507 | product_count int NOT NULL, |
---|
508 | create_date timestamp NOT NULL DEFAULT now() |
---|
509 | ); |
---|
510 | |
---|
511 | CREATE TABLE dtb_category_total_count ( |
---|
512 | category_id int NOT NULL, |
---|
513 | product_count int, |
---|
514 | create_date timestamp NOT NULL DEFAULT now() |
---|
515 | ); |
---|
516 | |
---|
517 | CREATE TABLE dtb_news ( |
---|
518 | news_id int NOT NULL, |
---|
519 | news_date timestamp, |
---|
520 | rank int, |
---|
521 | news_title text NOT NULL, |
---|
522 | news_comment text, |
---|
523 | news_url text, |
---|
524 | news_select smallint NOT NULL DEFAULT 0, |
---|
525 | link_method text, |
---|
526 | creator_id int NOT NULL, |
---|
527 | create_date timestamp NOT NULL DEFAULT now(), |
---|
528 | update_date timestamp NOT NULL, |
---|
529 | del_flg smallint NOT NULL DEFAULT 0, |
---|
530 | PRIMARY KEY (news_id) |
---|
531 | ); |
---|
532 | |
---|
533 | CREATE TABLE dtb_best_products ( |
---|
534 | best_id int NOT NULL, |
---|
535 | category_id int NOT NULL, |
---|
536 | rank int NOT NULL DEFAULT 0, |
---|
537 | product_id int NOT NULL, |
---|
538 | title text, |
---|
539 | comment text, |
---|
540 | creator_id int NOT NULL, |
---|
541 | create_date timestamp NOT NULL DEFAULT now(), |
---|
542 | update_date timestamp NOT NULL, |
---|
543 | del_flg smallint NOT NULL DEFAULT 0, |
---|
544 | PRIMARY KEY (best_id) |
---|
545 | ); |
---|
546 | |
---|
547 | CREATE TABLE dtb_mail_history ( |
---|
548 | send_id int NOT NULL, |
---|
549 | order_id int NOT NULL, |
---|
550 | send_date timestamp, |
---|
551 | template_id int, |
---|
552 | creator_id int NOT NULL, |
---|
553 | subject text, |
---|
554 | mail_body text, |
---|
555 | PRIMARY KEY (send_id) |
---|
556 | ); |
---|
557 | |
---|
558 | CREATE TABLE dtb_customer ( |
---|
559 | customer_id int NOT NULL, |
---|
560 | name01 text NOT NULL, |
---|
561 | name02 text NOT NULL, |
---|
562 | kana01 text NOT NULL, |
---|
563 | kana02 text NOT NULL, |
---|
564 | zip01 text, |
---|
565 | zip02 text, |
---|
566 | pref smallint, |
---|
567 | addr01 text, |
---|
568 | addr02 text, |
---|
569 | email text NOT NULL, |
---|
570 | email_mobile text, |
---|
571 | tel01 text, |
---|
572 | tel02 text, |
---|
573 | tel03 text, |
---|
574 | fax01 text, |
---|
575 | fax02 text, |
---|
576 | fax03 text, |
---|
577 | sex smallint, |
---|
578 | job smallint, |
---|
579 | birth timestamp, |
---|
580 | password text, |
---|
581 | reminder smallint, |
---|
582 | reminder_answer text, |
---|
583 | salt text, |
---|
584 | secret_key text NOT NULL UNIQUE, |
---|
585 | first_buy_date timestamp, |
---|
586 | last_buy_date timestamp, |
---|
587 | buy_times numeric DEFAULT 0, |
---|
588 | buy_total numeric DEFAULT 0, |
---|
589 | point numeric DEFAULT 0, |
---|
590 | note text, |
---|
591 | status smallint NOT NULL DEFAULT 1, |
---|
592 | create_date timestamp NOT NULL DEFAULT now(), |
---|
593 | update_date timestamp NOT NULL, |
---|
594 | del_flg smallint NOT NULL DEFAULT 0, |
---|
595 | mobile_phone_id text, |
---|
596 | mailmaga_flg smallint, |
---|
597 | PRIMARY KEY (customer_id) |
---|
598 | ); |
---|
599 | |
---|
600 | CREATE TABLE dtb_order ( |
---|
601 | order_id int NOT NULL, |
---|
602 | order_temp_id text, |
---|
603 | customer_id int NOT NULL, |
---|
604 | message text, |
---|
605 | order_name01 text, |
---|
606 | order_name02 text, |
---|
607 | order_kana01 text, |
---|
608 | order_kana02 text, |
---|
609 | order_email text, |
---|
610 | order_tel01 text, |
---|
611 | order_tel02 text, |
---|
612 | order_tel03 text, |
---|
613 | order_fax01 text, |
---|
614 | order_fax02 text, |
---|
615 | order_fax03 text, |
---|
616 | order_zip01 text, |
---|
617 | order_zip02 text, |
---|
618 | order_pref smallint, |
---|
619 | order_addr01 text, |
---|
620 | order_addr02 text, |
---|
621 | order_sex smallint, |
---|
622 | order_birth timestamp, |
---|
623 | order_job int, |
---|
624 | subtotal numeric, |
---|
625 | discount numeric, |
---|
626 | deliv_fee numeric, |
---|
627 | charge numeric, |
---|
628 | use_point numeric, |
---|
629 | add_point numeric, |
---|
630 | birth_point numeric DEFAULT 0, |
---|
631 | tax numeric, |
---|
632 | total numeric, |
---|
633 | payment_total numeric, |
---|
634 | payment_id int, |
---|
635 | payment_method text, |
---|
636 | note text, |
---|
637 | status smallint, |
---|
638 | create_date timestamp NOT NULL DEFAULT now(), |
---|
639 | update_date timestamp NOT NULL, |
---|
640 | commit_date timestamp, |
---|
641 | payment_date timestamp, |
---|
642 | device_type_id int, |
---|
643 | del_flg smallint NOT NULL DEFAULT 0, |
---|
644 | memo01 text, |
---|
645 | memo02 text, |
---|
646 | memo03 text, |
---|
647 | memo04 text, |
---|
648 | memo05 text, |
---|
649 | memo06 text, |
---|
650 | memo07 text, |
---|
651 | memo08 text, |
---|
652 | memo09 text, |
---|
653 | memo10 text, |
---|
654 | PRIMARY KEY (order_id) |
---|
655 | ); |
---|
656 | |
---|
657 | CREATE TABLE dtb_order_temp ( |
---|
658 | order_temp_id text NOT NULL, |
---|
659 | customer_id int NOT NULL, |
---|
660 | message text, |
---|
661 | order_name01 text, |
---|
662 | order_name02 text, |
---|
663 | order_kana01 text, |
---|
664 | order_kana02 text, |
---|
665 | order_email text, |
---|
666 | order_tel01 text, |
---|
667 | order_tel02 text, |
---|
668 | order_tel03 text, |
---|
669 | order_fax01 text, |
---|
670 | order_fax02 text, |
---|
671 | order_fax03 text, |
---|
672 | order_zip01 text, |
---|
673 | order_zip02 text, |
---|
674 | order_pref smallint, |
---|
675 | order_addr01 text, |
---|
676 | order_addr02 text, |
---|
677 | order_sex smallint, |
---|
678 | order_birth timestamp, |
---|
679 | order_job int, |
---|
680 | subtotal numeric, |
---|
681 | discount numeric, |
---|
682 | deliv_fee numeric, |
---|
683 | charge numeric, |
---|
684 | use_point numeric, |
---|
685 | add_point numeric, |
---|
686 | birth_point numeric DEFAULT 0, |
---|
687 | tax numeric, |
---|
688 | total numeric, |
---|
689 | payment_total numeric, |
---|
690 | payment_id int, |
---|
691 | payment_method text, |
---|
692 | note text, |
---|
693 | mail_flag smallint, |
---|
694 | status smallint, |
---|
695 | deliv_check smallint, |
---|
696 | point_check smallint, |
---|
697 | create_date timestamp NOT NULL DEFAULT now(), |
---|
698 | update_date timestamp NOT NULL, |
---|
699 | device_type_id int, |
---|
700 | del_flg smallint NOT NULL DEFAULT 0, |
---|
701 | order_id int, |
---|
702 | memo01 text, |
---|
703 | memo02 text, |
---|
704 | memo03 text, |
---|
705 | memo04 text, |
---|
706 | memo05 text, |
---|
707 | memo06 text, |
---|
708 | memo07 text, |
---|
709 | memo08 text, |
---|
710 | memo09 text, |
---|
711 | memo10 text, |
---|
712 | session text |
---|
713 | ); |
---|
714 | |
---|
715 | CREATE TABLE dtb_shipping ( |
---|
716 | shipping_id int NOT NULL, |
---|
717 | order_id int NOT NULL, |
---|
718 | shipping_name01 text, |
---|
719 | shipping_name02 text, |
---|
720 | shipping_kana01 text, |
---|
721 | shipping_kana02 text, |
---|
722 | shipping_tel01 text, |
---|
723 | shipping_tel02 text, |
---|
724 | shipping_tel03 text, |
---|
725 | shipping_fax01 text, |
---|
726 | shipping_fax02 text, |
---|
727 | shipping_fax03 text, |
---|
728 | shipping_pref smallint, |
---|
729 | shipping_zip01 text, |
---|
730 | shipping_zip02 text, |
---|
731 | shipping_addr01 text, |
---|
732 | shipping_addr02 text, |
---|
733 | deliv_id int NOT NULL, |
---|
734 | time_id int, |
---|
735 | shipping_time text, |
---|
736 | shipping_num text, |
---|
737 | shipping_date timestamp, |
---|
738 | shipping_commit_date timestamp, |
---|
739 | rank int, |
---|
740 | create_date timestamp NOT NULL DEFAULT now(), |
---|
741 | update_date timestamp, |
---|
742 | del_flg smallint NOT NULL DEFAULT 0, |
---|
743 | PRIMARY KEY (shipping_id, order_id) |
---|
744 | ); |
---|
745 | |
---|
746 | CREATE TABLE dtb_shipment_item ( |
---|
747 | shipping_id int NOT NULL, |
---|
748 | product_class_id int NOT NULL, |
---|
749 | order_id int NOT NULL, |
---|
750 | product_name text NOT NULL, |
---|
751 | product_code text, |
---|
752 | classcategory_name1 text, |
---|
753 | classcategory_name2 text, |
---|
754 | price numeric, |
---|
755 | quantity numeric, |
---|
756 | PRIMARY KEY (shipping_id, product_class_id, order_id) |
---|
757 | ); |
---|
758 | |
---|
759 | CREATE TABLE dtb_other_deliv ( |
---|
760 | other_deliv_id int NOT NULL, |
---|
761 | customer_id int NOT NULL, |
---|
762 | name01 text, |
---|
763 | name02 text, |
---|
764 | kana01 text, |
---|
765 | kana02 text, |
---|
766 | zip01 text, |
---|
767 | zip02 text, |
---|
768 | pref smallint, |
---|
769 | addr01 text, |
---|
770 | addr02 text, |
---|
771 | tel01 text, |
---|
772 | tel02 text, |
---|
773 | tel03 text, |
---|
774 | PRIMARY KEY (other_deliv_id) |
---|
775 | ); |
---|
776 | |
---|
777 | CREATE TABLE dtb_order_detail ( |
---|
778 | order_id int NOT NULL, |
---|
779 | product_id int NOT NULL, |
---|
780 | product_class_id int NOT NULL, |
---|
781 | product_name text NOT NULL, |
---|
782 | product_code text, |
---|
783 | classcategory_name1 text, |
---|
784 | classcategory_name2 text, |
---|
785 | price numeric, |
---|
786 | quantity numeric, |
---|
787 | point_rate numeric |
---|
788 | ); |
---|
789 | |
---|
790 | CREATE TABLE dtb_member ( |
---|
791 | member_id int NOT NULL, |
---|
792 | name text, |
---|
793 | department text, |
---|
794 | login_id text NOT NULL, |
---|
795 | password text NOT NULL, |
---|
796 | salt text NOT NULL, |
---|
797 | authority smallint NOT NULL, |
---|
798 | rank int NOT NULL DEFAULT 0, |
---|
799 | work smallint NOT NULL DEFAULT 1, |
---|
800 | del_flg smallint NOT NULL DEFAULT 0, |
---|
801 | creator_id int NOT NULL, |
---|
802 | create_date timestamp NOT NULL DEFAULT now(), |
---|
803 | update_date timestamp NOT NULL, |
---|
804 | login_date timestamp, |
---|
805 | PRIMARY KEY (member_id) |
---|
806 | ); |
---|
807 | |
---|
808 | CREATE TABLE dtb_bat_relate_products ( |
---|
809 | product_id int, |
---|
810 | relate_product_id int, |
---|
811 | customer_id int, |
---|
812 | create_date timestamp NOT NULL DEFAULT now() |
---|
813 | ); |
---|
814 | |
---|
815 | CREATE TABLE dtb_pagelayout ( |
---|
816 | device_type_id int NOT NULL, |
---|
817 | page_id int NOT NULL, |
---|
818 | page_name text, |
---|
819 | url text NOT NULL, |
---|
820 | php_dir text, |
---|
821 | tpl_dir text, |
---|
822 | filename text, |
---|
823 | header_chk smallint DEFAULT 1, |
---|
824 | footer_chk smallint DEFAULT 1, |
---|
825 | edit_flg smallint DEFAULT 1, |
---|
826 | author text, |
---|
827 | description text, |
---|
828 | keyword text, |
---|
829 | update_url text, |
---|
830 | create_date timestamp NOT NULL DEFAULT now(), |
---|
831 | update_date timestamp NOT NULL, |
---|
832 | PRIMARY KEY (device_type_id, page_id) |
---|
833 | ); |
---|
834 | |
---|
835 | CREATE TABLE dtb_bloc ( |
---|
836 | device_type_id int NOT NULL, |
---|
837 | bloc_id int NOT NULL, |
---|
838 | bloc_name text, |
---|
839 | tpl_path text, |
---|
840 | filename text NOT NULL, |
---|
841 | create_date timestamp NOT NULL DEFAULT now(), |
---|
842 | update_date timestamp NOT NULL, |
---|
843 | php_path text, |
---|
844 | deletable_flg smallint NOT NULL DEFAULT 1, |
---|
845 | PRIMARY KEY (device_type_id, bloc_id), |
---|
846 | UNIQUE (device_type_id, filename) |
---|
847 | ); |
---|
848 | |
---|
849 | CREATE TABLE dtb_blocposition ( |
---|
850 | device_type_id int NOT NULL, |
---|
851 | page_id int NOT NULL, |
---|
852 | target_id int, |
---|
853 | bloc_id int, |
---|
854 | bloc_row int, |
---|
855 | anywhere smallint DEFAULT 0 NOT NULL, |
---|
856 | PRIMARY KEY (device_type_id, page_id, target_id, bloc_id) |
---|
857 | ); |
---|
858 | |
---|
859 | CREATE TABLE dtb_csv ( |
---|
860 | no int, |
---|
861 | csv_id int NOT NULL, |
---|
862 | col text, |
---|
863 | disp_name text, |
---|
864 | rank int, |
---|
865 | rw_flg smallint DEFAULT 1, |
---|
866 | status smallint NOT NULL DEFAULT 1, |
---|
867 | create_date timestamp NOT NULL DEFAULT now(), |
---|
868 | update_date timestamp NOT NULL, |
---|
869 | mb_convert_kana_option text, |
---|
870 | size_const_type text, |
---|
871 | error_check_types text, |
---|
872 | PRIMARY KEY (no) |
---|
873 | ); |
---|
874 | |
---|
875 | CREATE TABLE dtb_csv_sql ( |
---|
876 | sql_id int, |
---|
877 | sql_name text NOT NULL, |
---|
878 | csv_sql text, |
---|
879 | create_date timestamp NOT NULL DEFAULT now(), |
---|
880 | update_date timestamp NOT NULL, |
---|
881 | PRIMARY KEY (sql_id) |
---|
882 | ); |
---|
883 | |
---|
884 | CREATE TABLE dtb_templates ( |
---|
885 | template_code text NOT NULL, |
---|
886 | device_type_id int NOT NULL, |
---|
887 | template_name text, |
---|
888 | create_date timestamp NOT NULL DEFAULT now(), |
---|
889 | update_date timestamp NOT NULL, |
---|
890 | PRIMARY KEY (template_code) |
---|
891 | ); |
---|
892 | |
---|
893 | CREATE TABLE dtb_table_comment ( |
---|
894 | id int, |
---|
895 | table_name text, |
---|
896 | column_name text, |
---|
897 | description text, |
---|
898 | PRIMARY KEY (id) |
---|
899 | ); |
---|
900 | |
---|
901 | CREATE TABLE dtb_maker ( |
---|
902 | maker_id int NOT NULL, |
---|
903 | name text NOT NULL, |
---|
904 | rank int NOT NULL DEFAULT 0, |
---|
905 | creator_id int NOT NULL, |
---|
906 | create_date timestamp NOT NULL DEFAULT now(), |
---|
907 | update_date timestamp NOT NULL, |
---|
908 | del_flg smallint NOT NULL DEFAULT 0, |
---|
909 | PRIMARY KEY (maker_id) |
---|
910 | ); |
---|
911 | |
---|
912 | CREATE TABLE dtb_maker_count ( |
---|
913 | maker_id int NOT NULL, |
---|
914 | product_count int NOT NULL, |
---|
915 | create_date timestamp NOT NULL DEFAULT now() |
---|
916 | ); |
---|
917 | |
---|
918 | CREATE TABLE mtb_pref ( |
---|
919 | id text, |
---|
920 | name text, |
---|
921 | rank smallint NOT NULL DEFAULT 0, |
---|
922 | PRIMARY KEY (id) |
---|
923 | ); |
---|
924 | |
---|
925 | CREATE TABLE mtb_permission ( |
---|
926 | id text, |
---|
927 | name text, |
---|
928 | rank smallint NOT NULL DEFAULT 0, |
---|
929 | PRIMARY KEY (id) |
---|
930 | ); |
---|
931 | |
---|
932 | CREATE TABLE mtb_disable_logout ( |
---|
933 | id smallint, |
---|
934 | name text, |
---|
935 | rank smallint NOT NULL DEFAULT 0, |
---|
936 | PRIMARY KEY (id) |
---|
937 | ); |
---|
938 | |
---|
939 | CREATE TABLE mtb_authority ( |
---|
940 | id smallint, |
---|
941 | name text, |
---|
942 | rank smallint NOT NULL DEFAULT 0, |
---|
943 | PRIMARY KEY (id) |
---|
944 | ); |
---|
945 | |
---|
946 | CREATE TABLE mtb_work ( |
---|
947 | id smallint, |
---|
948 | name text, |
---|
949 | rank smallint NOT NULL DEFAULT 0, |
---|
950 | PRIMARY KEY (id) |
---|
951 | ); |
---|
952 | |
---|
953 | CREATE TABLE mtb_disp ( |
---|
954 | id smallint, |
---|
955 | name text, |
---|
956 | rank smallint NOT NULL DEFAULT 0, |
---|
957 | PRIMARY KEY (id) |
---|
958 | ); |
---|
959 | |
---|
960 | CREATE TABLE mtb_class ( |
---|
961 | id smallint, |
---|
962 | name text, |
---|
963 | rank smallint NOT NULL DEFAULT 0, |
---|
964 | PRIMARY KEY (id) |
---|
965 | ); |
---|
966 | |
---|
967 | CREATE TABLE mtb_status ( |
---|
968 | id smallint, |
---|
969 | name text, |
---|
970 | rank smallint NOT NULL DEFAULT 0, |
---|
971 | PRIMARY KEY (id) |
---|
972 | ); |
---|
973 | |
---|
974 | CREATE TABLE mtb_status_image ( |
---|
975 | id smallint, |
---|
976 | name text, |
---|
977 | rank smallint NOT NULL DEFAULT 0, |
---|
978 | PRIMARY KEY (id) |
---|
979 | ); |
---|
980 | |
---|
981 | CREATE TABLE mtb_allowed_tag ( |
---|
982 | id smallint, |
---|
983 | name text, |
---|
984 | rank smallint NOT NULL DEFAULT 0, |
---|
985 | PRIMARY KEY (id) |
---|
986 | ); |
---|
987 | |
---|
988 | CREATE TABLE mtb_page_max ( |
---|
989 | id smallint, |
---|
990 | name text, |
---|
991 | rank smallint NOT NULL DEFAULT 0, |
---|
992 | PRIMARY KEY (id) |
---|
993 | ); |
---|
994 | |
---|
995 | CREATE TABLE mtb_magazine_type ( |
---|
996 | id smallint, |
---|
997 | name text, |
---|
998 | rank smallint NOT NULL DEFAULT 0, |
---|
999 | PRIMARY KEY (id) |
---|
1000 | ); |
---|
1001 | |
---|
1002 | CREATE TABLE mtb_mail_magazine_type ( |
---|
1003 | id smallint, |
---|
1004 | name text, |
---|
1005 | rank smallint NOT NULL DEFAULT 0, |
---|
1006 | PRIMARY KEY (id) |
---|
1007 | ); |
---|
1008 | |
---|
1009 | CREATE TABLE mtb_recommend ( |
---|
1010 | id smallint, |
---|
1011 | name text, |
---|
1012 | rank smallint NOT NULL DEFAULT 0, |
---|
1013 | PRIMARY KEY (id) |
---|
1014 | ); |
---|
1015 | |
---|
1016 | CREATE TABLE mtb_taxrule ( |
---|
1017 | id smallint, |
---|
1018 | name text, |
---|
1019 | rank smallint NOT NULL DEFAULT 0, |
---|
1020 | PRIMARY KEY (id) |
---|
1021 | ); |
---|
1022 | |
---|
1023 | CREATE TABLE mtb_mail_template ( |
---|
1024 | id smallint, |
---|
1025 | name text, |
---|
1026 | rank smallint NOT NULL DEFAULT 0, |
---|
1027 | PRIMARY KEY (id) |
---|
1028 | ); |
---|
1029 | |
---|
1030 | CREATE TABLE mtb_mail_tpl_path ( |
---|
1031 | id smallint, |
---|
1032 | name text, |
---|
1033 | rank smallint NOT NULL DEFAULT 0, |
---|
1034 | PRIMARY KEY (id) |
---|
1035 | ); |
---|
1036 | |
---|
1037 | CREATE TABLE mtb_job ( |
---|
1038 | id smallint, |
---|
1039 | name text, |
---|
1040 | rank smallint NOT NULL DEFAULT 0, |
---|
1041 | PRIMARY KEY (id) |
---|
1042 | ); |
---|
1043 | |
---|
1044 | CREATE TABLE mtb_reminder ( |
---|
1045 | id smallint, |
---|
1046 | name text, |
---|
1047 | rank smallint NOT NULL DEFAULT 0, |
---|
1048 | PRIMARY KEY (id) |
---|
1049 | ); |
---|
1050 | |
---|
1051 | CREATE TABLE mtb_sex ( |
---|
1052 | id smallint, |
---|
1053 | name text, |
---|
1054 | rank smallint NOT NULL DEFAULT 0, |
---|
1055 | PRIMARY KEY (id) |
---|
1056 | ); |
---|
1057 | |
---|
1058 | CREATE TABLE mtb_page_rows ( |
---|
1059 | id smallint, |
---|
1060 | name text, |
---|
1061 | rank smallint NOT NULL DEFAULT 0, |
---|
1062 | PRIMARY KEY (id) |
---|
1063 | ); |
---|
1064 | |
---|
1065 | CREATE TABLE mtb_mail_type ( |
---|
1066 | id smallint, |
---|
1067 | name text, |
---|
1068 | rank smallint NOT NULL DEFAULT 0, |
---|
1069 | PRIMARY KEY (id) |
---|
1070 | ); |
---|
1071 | |
---|
1072 | CREATE TABLE mtb_order_status ( |
---|
1073 | id smallint, |
---|
1074 | name text, |
---|
1075 | rank smallint NOT NULL DEFAULT 0, |
---|
1076 | PRIMARY KEY (id) |
---|
1077 | ); |
---|
1078 | |
---|
1079 | CREATE TABLE mtb_product_status_color ( |
---|
1080 | id smallint, |
---|
1081 | name text, |
---|
1082 | rank smallint NOT NULL DEFAULT 0, |
---|
1083 | PRIMARY KEY (id) |
---|
1084 | ); |
---|
1085 | |
---|
1086 | CREATE TABLE mtb_order_status_color ( |
---|
1087 | id smallint, |
---|
1088 | name text, |
---|
1089 | rank smallint NOT NULL DEFAULT 0, |
---|
1090 | PRIMARY KEY (id) |
---|
1091 | ); |
---|
1092 | |
---|
1093 | CREATE TABLE mtb_wday ( |
---|
1094 | id smallint, |
---|
1095 | name text, |
---|
1096 | rank smallint NOT NULL DEFAULT 0, |
---|
1097 | PRIMARY KEY (id) |
---|
1098 | ); |
---|
1099 | |
---|
1100 | CREATE TABLE mtb_delivery_date ( |
---|
1101 | id smallint, |
---|
1102 | name text, |
---|
1103 | rank smallint NOT NULL DEFAULT 0, |
---|
1104 | PRIMARY KEY (id) |
---|
1105 | ); |
---|
1106 | |
---|
1107 | CREATE TABLE mtb_product_list_max ( |
---|
1108 | id smallint, |
---|
1109 | name text, |
---|
1110 | rank smallint NOT NULL DEFAULT 0, |
---|
1111 | PRIMARY KEY (id) |
---|
1112 | ); |
---|
1113 | |
---|
1114 | CREATE TABLE mtb_convenience ( |
---|
1115 | id smallint, |
---|
1116 | name text, |
---|
1117 | rank smallint NOT NULL DEFAULT 0, |
---|
1118 | PRIMARY KEY (id) |
---|
1119 | ); |
---|
1120 | |
---|
1121 | CREATE TABLE mtb_conveni_message ( |
---|
1122 | id smallint, |
---|
1123 | name text, |
---|
1124 | rank smallint NOT NULL DEFAULT 0, |
---|
1125 | PRIMARY KEY (id) |
---|
1126 | ); |
---|
1127 | |
---|
1128 | CREATE TABLE mtb_db ( |
---|
1129 | id smallint, |
---|
1130 | name text, |
---|
1131 | rank smallint NOT NULL DEFAULT 0, |
---|
1132 | PRIMARY KEY (id) |
---|
1133 | ); |
---|
1134 | |
---|
1135 | CREATE TABLE mtb_target ( |
---|
1136 | id smallint, |
---|
1137 | name text, |
---|
1138 | rank smallint NOT NULL DEFAULT 0, |
---|
1139 | PRIMARY KEY (id) |
---|
1140 | ); |
---|
1141 | |
---|
1142 | CREATE TABLE mtb_review_deny_url ( |
---|
1143 | id smallint, |
---|
1144 | name text, |
---|
1145 | rank smallint NOT NULL DEFAULT 0, |
---|
1146 | PRIMARY KEY (id) |
---|
1147 | ); |
---|
1148 | |
---|
1149 | CREATE TABLE mtb_track_back_status ( |
---|
1150 | id smallint, |
---|
1151 | name text, |
---|
1152 | rank smallint NOT NULL DEFAULT 0, |
---|
1153 | PRIMARY KEY (id) |
---|
1154 | ); |
---|
1155 | |
---|
1156 | CREATE TABLE mtb_site_control_track_back ( |
---|
1157 | id smallint, |
---|
1158 | name text, |
---|
1159 | rank smallint NOT NULL DEFAULT 0, |
---|
1160 | PRIMARY KEY (id) |
---|
1161 | ); |
---|
1162 | |
---|
1163 | CREATE TABLE mtb_site_control_affiliate ( |
---|
1164 | id smallint, |
---|
1165 | name text, |
---|
1166 | rank smallint NOT NULL DEFAULT 0, |
---|
1167 | PRIMARY KEY (id) |
---|
1168 | ); |
---|
1169 | |
---|
1170 | CREATE TABLE mtb_mobile_domain ( |
---|
1171 | id smallint, |
---|
1172 | name text, |
---|
1173 | rank smallint NOT NULL DEFAULT 0, |
---|
1174 | PRIMARY KEY (id) |
---|
1175 | ); |
---|
1176 | |
---|
1177 | CREATE TABLE mtb_ownersstore_err ( |
---|
1178 | id text, |
---|
1179 | name text, |
---|
1180 | rank smallint NOT NULL DEFAULT 0, |
---|
1181 | PRIMARY KEY (id) |
---|
1182 | ); |
---|
1183 | |
---|
1184 | CREATE TABLE mtb_ownersstore_ips ( |
---|
1185 | id text, |
---|
1186 | name text, |
---|
1187 | rank smallint NOT NULL DEFAULT 0, |
---|
1188 | PRIMARY KEY (id) |
---|
1189 | ); |
---|
1190 | |
---|
1191 | CREATE TABLE mtb_constants ( |
---|
1192 | id text, |
---|
1193 | name text, |
---|
1194 | rank smallint NOT NULL DEFAULT 0, |
---|
1195 | remarks text, |
---|
1196 | PRIMARY KEY (id) |
---|
1197 | ); |
---|
1198 | |
---|
1199 | CREATE TABLE mtb_product_type ( |
---|
1200 | id smallint, |
---|
1201 | name text, |
---|
1202 | rank smallint NOT NULL, |
---|
1203 | PRIMARY KEY (id) |
---|
1204 | ); |
---|
1205 | |
---|
1206 | CREATE TABLE mtb_device_type ( |
---|
1207 | id smallint, |
---|
1208 | name text, |
---|
1209 | rank smallint NOT NULL, |
---|
1210 | PRIMARY KEY (id) |
---|
1211 | ); |
---|
1212 | |
---|
1213 | CREATE TABLE dtb_mobile_ext_session_id ( |
---|
1214 | session_id text NOT NULL, |
---|
1215 | param_key text, |
---|
1216 | param_value text, |
---|
1217 | url text, |
---|
1218 | create_date timestamp NOT NULL DEFAULT now() |
---|
1219 | ); |
---|
1220 | |
---|
1221 | CREATE TABLE dtb_mobile_kara_mail ( |
---|
1222 | kara_mail_id int PRIMARY KEY, |
---|
1223 | session_id text NOT NULL, |
---|
1224 | token text NOT NULL, |
---|
1225 | next_url text NOT NULL, |
---|
1226 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1227 | email text, |
---|
1228 | receive_date timestamp |
---|
1229 | ); |
---|
1230 | |
---|
1231 | CREATE TABLE dtb_module ( |
---|
1232 | module_id int NOT NULL UNIQUE, |
---|
1233 | module_code text NOT NULL, |
---|
1234 | module_name text NOT NULL, |
---|
1235 | sub_data text, |
---|
1236 | auto_update_flg smallint NOT NULL DEFAULT 0, |
---|
1237 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1238 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1239 | update_date timestamp NOT NULL |
---|
1240 | ); |
---|
1241 | |
---|
1242 | CREATE TABLE dtb_session ( |
---|
1243 | sess_id text NOT NULL, |
---|
1244 | sess_data text, |
---|
1245 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1246 | update_date timestamp NOT NULL, |
---|
1247 | PRIMARY KEY (sess_id) |
---|
1248 | ); |
---|
1249 | |
---|
1250 | CREATE TABLE dtb_site_control ( |
---|
1251 | control_id int NOT NULL, |
---|
1252 | control_title text, |
---|
1253 | control_text text, |
---|
1254 | control_flg smallint NOT NULL DEFAULT 2, |
---|
1255 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1256 | memo text, |
---|
1257 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1258 | update_date timestamp NOT NULL, |
---|
1259 | PRIMARY KEY (control_id) |
---|
1260 | ); |
---|
1261 | |
---|
1262 | CREATE TABLE dtb_trackback ( |
---|
1263 | trackback_id int NOT NULL, |
---|
1264 | product_id int NOT NULL, |
---|
1265 | blog_name text NOT NULL, |
---|
1266 | title text NOT NULL, |
---|
1267 | excerpt text NOT NULL, |
---|
1268 | url text NOT NULL, |
---|
1269 | status smallint NOT NULL DEFAULT 2, |
---|
1270 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1271 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1272 | update_date timestamp NOT NULL, |
---|
1273 | PRIMARY KEY (trackback_id) |
---|
1274 | ); |
---|
1275 | |
---|
1276 | CREATE TABLE dtb_bkup ( |
---|
1277 | bkup_name text, |
---|
1278 | bkup_memo text, |
---|
1279 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1280 | PRIMARY KEY (bkup_name) |
---|
1281 | ); |
---|
1282 | |
---|
1283 | CREATE TABLE dtb_plugin ( |
---|
1284 | plugin_id int NOT NULL, |
---|
1285 | plugin_name text NOT NULL, |
---|
1286 | enable smallint NOT NULL DEFAULT 0, |
---|
1287 | del_flg smallint NOT NULL DEFAULT 0, |
---|
1288 | class_name text NOT NULL, |
---|
1289 | create_date timestamp NOT NULL DEFAULT now(), |
---|
1290 | update_date timestamp NOT NULL, |
---|
1291 | PRIMARY KEY (plugin_id) |
---|
1292 | ); |
---|
1293 | |
---|
1294 | CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id); |
---|
1295 | CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id); |
---|
1296 | CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id); |
---|
1297 | CREATE INDEX dtb_send_customer_customer_id_key ON dtb_send_customer(customer_id); |
---|
1298 | |
---|
1299 | CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key); |
---|
1300 | CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value); |
---|
1301 | CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url); |
---|
1302 | CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date); |
---|
1303 | |
---|
1304 | CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token); |
---|
1305 | CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date); |
---|
1306 | CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date); |
---|
1307 | |
---|
1308 | CREATE TABLE dtb_index_list ( |
---|
1309 | table_name text NOT NULL DEFAULT '', |
---|
1310 | column_name text NOT NULL DEFAULT '', |
---|
1311 | recommend_flg smallint NOT NULL DEFAULT 0, |
---|
1312 | recommend_comment text, |
---|
1313 | PRIMARY KEY (table_name, column_name) |
---|
1314 | ); |
---|