use provisioning;
set autocommit=0;

DROP INDEX IF EXISTS resnam_idx ON `billing`.`billing_profiles`;
CREATE UNIQUE INDEX IF NOT EXISTS resnam_idx ON `billing`.`billing_profiles`(`reseller_id`,`name`,`terminate_timestamp`);

DROP INDEX IF EXISTS reshand_idx ON `billing`.`billing_profiles`;
CREATE UNIQUE INDEX IF NOT EXISTS reshand_idx ON `billing`.`billing_profiles`(`reseller_id`, `handle`,`terminate_timestamp`);

commit;
