Created a function to check status of events, start to crete FK automatically for any configuration