# Loome uue schema db_create_new_schema <- function(conf) { source(paste0(getwd(), "/R/db_is_shema_exist.R")) if (!db_is_shema_exist(conf$schema)) { conn <- 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)