Separate db.sync from init so it can be called later