Tickets notes fix
SQL fix
Groups fix
Foreingn keys update
Merge branch 'hotfix/hotfix'