Migrate database, enable history page, change URLs