Only allow add_reference for newly created tables
What does this MR do?
This disallows the use of add_reference
on existing tables. It is only acceptable to be used if:
- The table in question is created with the same migration (because it's empty).
- The foreign key is created with an index, through
index: true
or similar.
Relates to: https://gitlab.com/gitlab-org/gitlab-ce/issues/67210
Edited by Andreas Brandl