Merge pull request 'fix' (#14) from master into dev
Reviewed-on: https://gitea.chocomarsh.com/self/monitoring/pulls/14
This commit is contained in:
commit
68c8099aaf
@ -53,11 +53,7 @@ func connect() (*driver.Conn, error) {
|
||||
}
|
||||
|
||||
func Migrate() error {
|
||||
rows, err := Connection.Query(context.TODO(), "SELECT 1")
|
||||
if err != nil {
|
||||
log.Fatal("Query failed:", err)
|
||||
}
|
||||
rows, err = Connection.Query(
|
||||
rows, err := Connection.Query(
|
||||
context.TODO(),
|
||||
`CREATE TABLE IF NOT EXISTS endpoints (
|
||||
timestamp DateTime,
|
||||
@ -65,7 +61,7 @@ func Migrate() error {
|
||||
endpoint LowCardinality(String),
|
||||
status_code UInt16,
|
||||
response_time_ms UInt32,
|
||||
request_method LowCardinality(String),
|
||||
request_method LowCardinality(String)
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
PARTITION BY toYYYYMM(timestamp)
|
||||
|
Loading…
Reference in New Issue
Block a user