Learn R Programming

dm (version 0.0.6.9000)

dm_rm_fk: Remove the reference(s) from one dm table to another

Description

This function can remove either one reference between two tables, or all references at once, if argument column = NULL. All arguments may be provided quoted or unquoted.

Usage

dm_rm_fk(dm, table, column, ref_table)

Arguments

dm

A dm object.

table

A table in the dm.

column

The column of table that should no longer be referencing the primary key of ref_table. If NULL, all columns will be evaluated.

ref_table

The table that table was referencing.

Value

An updated dm without the given foreign key relation.

See Also

Other foreign key functions: dm_add_fk(), dm_enum_fk_candidates(), dm_get_all_fks(), dm_get_fk(), dm_has_fk()

Examples

Run this code
# NOT RUN {
dm_rm_fk(
  dm_nycflights13(cycle = TRUE),
  flights,
  dest,
  airports
)
# }

Run the code above in your browser using DataLab