Implement database migration