Merge pull request 'fix' (#15) from master into dev
Reviewed-on: https://gitea.chocomarsh.com/self/monitoring/pulls/15
This commit is contained in:
commit
2afbdc7a94
@ -53,7 +53,7 @@ func connect() (*driver.Conn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Migrate() error {
|
func Migrate() error {
|
||||||
rows, err := Connection.Query(
|
err := Connection.Exec(
|
||||||
context.TODO(),
|
context.TODO(),
|
||||||
`CREATE TABLE IF NOT EXISTS endpoints (
|
`CREATE TABLE IF NOT EXISTS endpoints (
|
||||||
timestamp DateTime,
|
timestamp DateTime,
|
||||||
@ -71,6 +71,5 @@ func Migrate() error {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer rows.Close()
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user