Move Tables from One Schema to Another
alter_table_schema.RdMoves one or more tables from an existing schema to a new (target) schema
using ALTER TABLE ... SET SCHEMA. If the target schema does not exist,
it is created first.
Value
Invisibly returns a character vector of fully-qualified table names moved.
Side effects: creates new_schema if needed and alters table schemas.
Details
Ensures
new_schemaexists (CREATE SCHEMA IF NOT EXISTS).For each table in
table_names, runs:ALTER TABLE old_schema.table SET SCHEMA new_schema.Table and schema identifiers are safely quoted with
glue::glue_sql().
See also
Other db-manage:
copy_tables_to_new_location(),
create_database(),
create_if_not_exists_share(),
create_or_replace_share(),
create_schema(),
create_table(),
delete_and_create_schema(),
delete_database(),
delete_schema(),
delete_table(),
describe_share(),
drop_share(),
list_owned_shares(),
list_shared_with_me_shares(),
upload_database_to_md()