Create a table with the SCDB log structure if it does not exists
Source:R/create_logs_if_missing.R
create_logs_if_missing.Rd
Create a table with the SCDB log structure if it does not exists
Arguments
- conn
(
DBIConnection(1)
)
Connection object.- log_table
(
id-like object
)
A table specification where the logs should exist (coercible byid()
).
Examples
conn <- get_connection()
log_table <- id("test.logs", conn = conn, allow_table_only = TRUE)
create_logs_if_missing(conn, log_table)
#> # Source: table<`main`.`test.logs`> [0 x 11]
#> # Database: sqlite 3.46.0 [:memory:]
#> # ℹ 11 variables: date <dbl>, schema <chr>, table <chr>, n_insertions <int>,
#> # n_deactivations <int>, start_time <dbl>, end_time <dbl>, duration <chr>,
#> # success <int>, message <chr>, log_file <chr>
close_connection(conn)