The main template is now a simple view, there's no need to monkey patch TheMainTemplate._select_view_and_rset
try:# missing on some old databasessql('CREATE INDEX entities_extid_idx ON entities(extid)')except:pass# already existscheckpoint()sql('CREATE INDEX entities_type_idx ON entities(type)')checkpoint()