cosmos to sqlite

if up until here works but it fails before the commit at the end, then there'll be a partially initialized DB with just the sections. it's theoretically not too much of a problem, but I'd rather have either a fully non-initialized DB or a fully initialized DB