Skip to content

Commit

Permalink
Remove leftovers from testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzvonimir committed Apr 19, 2024
1 parent 77c99e1 commit 5f4960e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions database/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ func RunMigrations() {
createCommandsTable()
createConfigTable()
addIndexOnProcesses()
//addDetailedIndexOnProcesses()
}

func ensureMigrationTableExists() {
Expand Down Expand Up @@ -100,19 +99,6 @@ func addIndexOnProcesses() {
}
}

func addDetailedIndexOnProcesses() {
migrationName := "add_detailed_index_on_processes"
if !migrationApplied(migrationName) {
sql := `CREATE INDEX IF NOT EXISTS idx_processes_detailed ON processes(stored_time, cpu_usage, memory_usage, name, pid);`
_, err := DB.Exec(sql)
if err != nil {
fmt.Fprintf(config.SysConfig.ErrOut, "Failed to create detailed index: %s\n", err)
os.Exit(1)
}
recordMigration(migrationName)
}
}

func createConfigTable() {
migrationName := "create_config_table"
if !migrationApplied(migrationName) {
Expand Down

0 comments on commit 5f4960e

Please sign in to comment.