DROP INDEX IF EXISTS idx_unique_users;
DROP INDEX IF EXISTS idx_unique_rules;
CREATE UNIQUE INDEX idx_unique_users ON users (amoID) WHERE Deleted = false;
CREATE UNIQUE INDEX idx_unique_rules ON rules (accountID, QuizID) WHERE Deleted = false;