-- Keys can now sit in an inactive pool (imported but not yet released to
-- users) before an admin moves them to the active pool. Existing keys
-- default to 'active' so already-live claim links keep working exactly as
-- before -- only newly imported keys default to 'inactive' going forward
-- (that default lives in the app, not the column, on purpose).

ALTER TABLE `keys` ADD COLUMN pool ENUM('active','inactive') NOT NULL DEFAULT 'active' AFTER status;
ALTER TABLE `keys` DROP INDEX idx_key_allocation, ADD INDEX idx_key_allocation (product_id, platform, status, pool);
