Execute SQL statement to create table in database

This commit is contained in:
Ilya Chernishev
2026-02-15 13:08:40 +03:00
committed by GitHub
parent 72025dab7d
commit b27038a59c

View File

@@ -45,6 +45,7 @@ func initDB(dsn, sqlstr string) (err error) {
err = errors.Join(err, fmt.Errorf("failed to close %q: %w", dsn, closeErr))
}
}()
_, err = db.Exec(sqlstr)
if err != nil {
return fmt.Errorf("failed to create table: %w", err)
}