fleet/server/datastore/mysql/migrations/tables/20191220130734_AddLiveQueryDisabledToAppConfig.go
billcobbler a83a26b279 Add ability to disable live queries (#2167)
- Add toggle to disable live queries in advanced settings
- Add new live query status endpoint (checks for disabled via config and Redis health)
- Update QueryPage UI to use new live query status endpoint

Implements #2140
2020-01-13 16:53:04 -08:00

25 lines
471 B
Go

package tables
import (
"database/sql"
)
func init() {
MigrationClient.AddMigration(Up20191220130734, Down20191220130734)
}
func Up20191220130734(tx *sql.Tx) error {
_, err := tx.Exec(
"ALTER TABLE `app_configs` " +
"ADD COLUMN `live_query_disabled` TINYINT(1) NOT NULL DEFAULT FALSE;",
)
return err
}
func Down20191220130734(tx *sql.Tx) error {
_, err := tx.Exec(
"ALTER TABLE `app_configs` " +
"DROP COLUMN `live_query_disabled`;",
)
return err
}