-- copy contact ids
insert into contacts_sub1 (id_sub1) SELECT id FROM `contacts` WHERE 1;
-- copy course ids
insert into smsevent_sub1 (id_sub1) SELECT id FROM `smsevent` WHERE 1;
insert into smsevent_sub2 (id_sub2) SELECT id FROM `smsevent` WHERE 1;
insert into smsevent_sub3 (id_sub3) SELECT id FROM `smsevent` WHERE 1;
-- copy event_contacts
insert into event_contacts_sub1 (id_sub1) SELECT id FROM `event_contacts` WHERE 1;
-- copy fees
insert into sms_fee_sub1 (id_sub1) SELECT id FROM `sms_fee` WHERE 1;

-- truncate yoyaku related tables

TRUNCATE `yoyaku_basic`;
TRUNCATE `yoyaku_contacts`;
TRUNCATE `yoyaku_event_contacts`;
TRUNCATE `yoyaku_event_contacts_sub1`;
TRUNCATE `yoyaku_fees`;
TRUNCATE `yoyaku_fees_sub1`;
TRUNCATE `yoyaku_transactions`;



