create table dtb_blayn (
blayn_ip text
) type=innodb;
drop table if exists dtb_mailtemplate;
drop table if exists dtb_send_customer;
create table dtb_mailtemplate (
template_id int auto_increment primary key not null unique,
subject text,
header text,
footer text,
body text,
send_type int,
template_name text,
creator_id int not null,
del_flg smallint not null default 0,
create_date datetime not null,
update_date datetime not null
) type=innodb;
create table dtb_send_customer (
customer_id int,
send_id int not null,
email text,
name text,
send_flag smallint
) type=innodb;
alter table dtb_order_temp add column session text;
insert into dtb_table_comment(table_name,column_name,description) values ('dtb_mailtemplate','body','本文文書');
insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date)values(1,'(SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY update_date DESC limit 1 offset 4) AS recommend_product_id5','おすすめ商品(5)',53,now(),now());
insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date)values(1,'(SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY update_date DESC limit 1 offset 4) AS recommend_comment5','おすすめコメント(5)',54,now(),now());
insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date)values(1,'(SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY update_date DESC limit 1 offset 5) AS recommend_product_id6','おすすめ商品(6)',55,now(),now());
insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date)values(1,'(SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY update_date DESC limit 1 offset 5) AS recommend_comment6','おすすめコメント(6)',56,now(),now());
alter table dtb_module add column (icon text, url text);
insert into dtb_mailtemplate (template_id, subject, body, creator_id, update_date, create_date, send_type, template_name) values (
0,
'ご注文ありがとうございます。',
'{name}様
この度はご注文いただき誠に有難うございます。
下記ご注文内容にお間違えがないかご確認下さい。
{order}
このメッセージはお客様へのお知らせ専用ですので、
このメッセージへの返信としてご質問をお送りいただいても回答できません。
ご了承ください。
ご質問やご不明な点がございましたら、こちらからお願いいたします。',
0,
Now(),
Now(),
0,
'受注完了テンプレート(PC用)');
insert into dtb_mailtemplate (template_id, subject, body, creator_id, update_date, create_date, send_type, template_name) values (
1,
'ご注文ありがとうございます。',
'{name}様
この度はご注文いただき誠に有難うございます。
下記ご注文内容にお間違えがないかご確認下さい。
{order}
このメッセージはお客様へのお知らせ専用ですので、
このメッセージへの返信としてご質問をお送りいただいても回答できません。
ご了承ください。
ご質問やご不明な点がございましたら、こちらからお願いいたします。',
0,
Now(),
Now(),
1,
'受注完了テンプレート(携帯用)');