Create a Schema in a Database if It Does Not Exist
create_schema.RdEnsures that a specified schema exists in the given database. If the connection is to a MotherDuck instance, the function switches to the specified database before creating the schema. It also prints helpful connection and environment information via CLI messages for transparency.
Value
Invisibly returns `NULL`. Side effect: creates the schema if necessary and prints CLI messages.
Details
- Uses `DBI::dbExecute()` with `CREATE SCHEMA IF NOT EXISTS` to create the schema only when needed. - If connected to MotherDuck (determined by `validate_md_connection_status()`), executes `USE <database>` before creating the schema. - Displays connection/user/database information via internal CLI helpers.