mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
- 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
25 lines
471 B
Go
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
|
|
}
|