Sql: fix leak on first alembic call

on the first alembic call, sometime the connection was not correctly cleaned.

bellt and straps as they say!