Fix creation of database indexes (GH8083)

Tests fix

Fixes

Remove _executefunc

Fixed tests to work with Python3

Fix merge

Index test simplify
Fix creation of database indexes
Tests fix
Fixes
Remove _executefunc
Fixed tests to work with Python3
Schema rewriting