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

Revision history for this message
Jonathan Hitchcock (vhata) wrote :

> > 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...

As per our talk on IRC, this is what I think should happen:

All plugins should start at schema version 0 straight away - this is equivalent to having no tables. They should then provide per-DB 0-to-1 migrations which create the initial tables. 1-to-2 and so on obviously update these tables in a cross-DB compatible way.

Importing old data from a different database will require running all schema migrations from 0 to old-data-schema-version, then importing the data, then running all schema migrations from that version onwards.

« Back to merge proposal