Replace foreignkey by primarykey in question
Add security command to console
Bugfixe in SecurityCommand