fix declarative referential integrity
fix sqlite mutex/vfs/