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

Reviewed-on: https://gitea.chocomarsh.com/self/monitoring/pulls/13
This commit is contained in:
emmatveev 2025-06-13 02:35:41 +03:00
commit c8c7f63fdf

View File

@ -53,7 +53,11 @@ func connect() (*driver.Conn, error) {
} }
func Migrate() error { func Migrate() error {
rows, err := Connection.Query( rows, err := Connection.Query(context.TODO(), "SELECT 1")
if err != nil {
log.Fatal("Query failed:", err)
}
rows, err = Connection.Query(
context.TODO(), context.TODO(),
`CREATE TABLE IF NOT EXISTS endpoints ( `CREATE TABLE IF NOT EXISTS endpoints (
timestamp DateTime, timestamp DateTime,