Merge pull request 'fix' (#15) from master into dev

Reviewed-on: https://gitea.chocomarsh.com/self/monitoring/pulls/15
This commit is contained in:
emmatveev 2025-06-13 02:45:14 +03:00
commit 2afbdc7a94

View File

@ -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
} }