| 123456789101112131415161718192021 |
- #' Create the new schema
- #'
- #' Loome andmebaasi uue schema.
- #' @param conf list List of configuration data. Rewrite it.
- #' @keywords database, schema
- #' @export
- #' @examples
- #' config <- get_config()
- #' db_create_new_schema(conf = config)
- db_create_new_schema <- function(conf) {
- if (!ruut::db_is_shema_exist(conf$schema)) {
- conn <- ruut::db_connect()
- DBI::dbExecute(conn, sprintf(
- "-- DROP SCHEMA x_matsalu;
- CREATE SCHEMA %s AUTHORIZATION %s;", conf$schema, conf$user
- ))
- }
- }
- # conf <- ruut::get_config()
- # conf$schema <- "x_valga"
- # db_create_new_schema(conf)
|