Skip to content
Snippets Groups Projects
Commit 601eb8f8 authored by Jared Hancock's avatar Jared Hancock
Browse files

upgrade: Avoid creating unnecessary index

There's a unique index on %user_email.address, so there's no need to create
an index on %ticket.email when matching up records.
parent 683874a9
No related branches found
No related tags found
No related merge requests found
......@@ -53,12 +53,10 @@ UPDATE `%TABLE_PREFIX%user_email` A1
ALTER TABLE `%TABLE_PREFIX%user` DROP INDEX `def_eml_id`;
-- - Update the ticket table
ALTER TABLE `%TABLE_PREFIX%ticket` ADD KEY `email_lookup` (`email`);
UPDATE `%TABLE_PREFIX%ticket` A1
JOIN `%TABLE_PREFIX%user_email` A2 ON A2.`address` = A1.`email`
SET A1.`user_id` = A2.`user_id`,
A1.`user_email_id` = A2.`id`;
ALTER TABLE `%TABLE_PREFIX%ticket` DROP INDEX `email_lookup`;
-- TODO: Move this to a client info dynamic entry
-- 4. Create form entries for each ticket
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment