Adds initial support for indexes

Both on mysql and postgresql