Migrate team page to database