Perform changes to db layer to make it work correctly