Fix 'sid' column on the shares table

Wasn't set as 'AUTO INCREMENT'
Add a shares repository

Includes an implementation based on Doctrine ORM