Added check for foreign key violations following each SQLite migration, when a debugger is attached.