Refactored ticket table database.