Code review comment for lp:~stefanor/ibid/db-import-export

Revision history for this message
Stefano Rivera (stefanor) wrote :

> I think a nicer way to do this is to make -v a counter, and set
> `level=30-(verbose*10)`. -v then sets WARNINg, -vv sets INFO, and -vvv sets
> DEBUG.

Yeah, should probably do that everywhere

> > + version = re.match(r'^# Ibid (.+) Database dump for', version).group(1)
>
> I'd prefer storing information which will be parsed in JSON instead of using
> regexes.

Yup. I've actually been meaning to ago back and change that - too strict.

> Does that mean that you can't restore an old Ibid dump with a newer Ibid?
> That's fine for now if it's non-trivial to handle, but ideally it would
> import it and then upgrade.

Unfortunatly so. The problem is that Ibid can't setup a new DB based on an
arbitrary past schema version. And we can't just save the schema in the dump
because one of the aims of the DB is to be cross-DB compatible.

We could insert the data, and just hope it works...

« Back to merge proposal