mirror of https://github.com/citusdata/citus.git
Cover ADD COLUMN commands defining fkeys
parent
1b53193eb9
commit
6af1ece547
|
@ -1033,6 +1033,19 @@ AlterTableCmdAddsFKey(AlterTableCmd *command, Oid relationId)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (alterTableType == AT_AddColumn)
|
||||||
|
{
|
||||||
|
ColumnDef *columnDef = (ColumnDef *) command->def;
|
||||||
|
List *constraints = columnDef->constraints;
|
||||||
|
Constraint *constraint = NULL;
|
||||||
|
foreach_ptr(constraint, constraints)
|
||||||
|
{
|
||||||
|
if (constraint->contype == CONSTR_FOREIGN)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue