Refact tests
Fix remove index for sqlite and postgres
Refact tests