func GetOperation(applicationID string) ([]*Operation, error) {
	ops := make([]*Operation, 0)
	rows, err := db.Query(
		`SELECT id, script FROM operations WHERE application_id = $1 and status = $2`,
		applicationID, "CRITICAL")
	if err != nil {
		return ops, err
	}
	defer rows.Close()
	for rows.Next() {
		var (
			id     int
			script string
		)
		if err := rows.Scan(&id, &script); err != nil {
			return ops, err
		}
		ops = append(ops, &Operation{id, script})
	}
	return ops, nil
}
GetOperation returns the script.
package storage
func InsertOperation(alertID int, applicationID, script, status string) int {
	lastInsertID := 0
	sqlStatement := `INSERT INTO operations (application_id, script, status, alert_id)
						VALUES ($1, $2, $3, $4) RETURNING id`
	err := db.QueryRow(sqlStatement, applicationID, script, status, alertID).Scan(&lastInsertID)
	if err != nil {
		panic(err)
	}
	return lastInsertID
}