dm
to anotherAdd a reference from one table of a dm
to another
cdm_add_fk(dm, table, column, ref_table, check = FALSE)
A dm
object.
A table in the dm
.
The column of table
which is to become the foreign key column and
reference the primary key of ref_table
.
The table which table
is referencing.
This table needs to have a primary key set.
Boolean, if TRUE
, a check will be performed to determine if the values of
column
are a subset of the values of the primary key column of ref_table
.
Other foreign key functions:
cdm_enum_fk_candidates()
,
cdm_get_all_fks()
,
cdm_get_fk()
,
cdm_has_fk()
,
cdm_rm_fk()