initialize creates the "checks" table in the database.
()
| 193 | |
| 194 | // initialize creates the "checks" table in the database. |
| 195 | func (sql Storage) initialize() error { |
| 196 | db, err := sql.dbConnect() |
| 197 | if err != nil { |
| 198 | return err |
| 199 | } |
| 200 | defer db.Close() |
| 201 | |
| 202 | _, err = db.Exec(schema) |
| 203 | return err |
| 204 | } |