Rearrange sqlite and pg gems