fix sqlite composite primary key generation