mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* Further optimize host select with policies * Add missing row close * Improve migration * Skip migration if column already exists * Add test for host with/without extras
21 lines
396 B
Go
21 lines
396 B
Go
package tables
|
|
|
|
import (
|
|
"database/sql"
|
|
)
|
|
|
|
func init() {
|
|
MigrationClient.AddMigration(Up_20211109121546, Down_20211109121546)
|
|
}
|
|
|
|
func Up_20211109121546(tx *sql.Tx) error {
|
|
if columnExists(tx, "host_users", "shell") {
|
|
return nil
|
|
}
|
|
_, err := tx.Exec(`ALTER TABLE host_users ADD COLUMN shell varchar(255) DEFAULT ''`)
|
|
return err
|
|
}
|
|
|
|
func Down_20211109121546(tx *sql.Tx) error {
|
|
return nil
|
|
}
|