#539 Add missing FK constraints
Testcase to check if FK constraint is added when you create a new column
FK Constraint
-
Login as sysadmin and pick a table (e.g. M_InOut)
- add a column that doesn’t already exist there (e.g. C_Currency_ID)
- the column needs to be of type table, table direct or search (to reference a table. In my case, C_Currency)
-
press on issyncdatabase button
- go to the place where migrationscripts are saved, open your migrationscript
- => you have 1 insert into AD_Column, 1 inssert into AD_Column_Trl,
- => 2 alter table, 1 for adding the column, 1 for adding the constraint
- now if you want to remove the column you have to:
- drop the constraint
- delete the column (you can do it from application)
- drop the column
View source file on GitHub.com