Allow builtin named queries to be disabled

Summary:
Applications come with builtin queries, but users might want to get rid of them. Allow users to disable named queries if they prefer.

This has one funky behavior, which is that the first time you disable a named query it goes to the top of your list. That will be fixed in the next diff, which will make them reorderable.

Test Plan: Added/edited/removed named queries, disabled/enabled builtin named queries.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6128
This commit is contained in:
epriestley
2013-06-05 05:28:25 -07:00
parent 7fbfeca802
commit 758586abda
7 changed files with 144 additions and 54 deletions

View File

@@ -0,0 +1,8 @@
ALTER TABLE {$NAMESPACE}_search.search_namedquery
ADD isBuiltin BOOL NOT NULL DEFAULT 0;
ALTER TABLE {$NAMESPACE}_search.search_namedquery
ADD isDisabled BOOL NOT NULL DEFAULT 0;
ALTER TABLE {$NAMESPACE}_search.search_namedquery
ADD sequence INT UNSIGNED NOT NULL DEFAULT 0;