"Matt Sergeant" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi guys,
>
> Anyone who has read my journal will know that I now have DBD::SQLite
> ported to SQLite 3.0, which provides better datatypes, better
> concurrency, proper blob support, etc.
>
> Now the big problem is that sqlite 3.0 is incompatible with sqlite 2.x
> (which the current CPAN version of DBD::SQLite is based on), and if you
> try and open an old database it will fail horribly. So we have an
> upgrade problem.
>
> Potential solutions:
>
> - Rename it DBD::SQLite3. I don't like this solution because the API
> remains the same, and so anyone who wants to upgrade will have to
> change their code. This is specially relevant for CPAN modules which
> use DBD::SQLite.
>
> - Provide some sort of porting tool. Not sure the best way to do this
> - the sqlite docs recommend just doing a dump from the old format and
> an import into the new, but that will require both versions installed.
>
> - Ignore the problem - it might be painful for the few people who use
> DBD::SQLite, but it's a one-time pain.
>
> - Provide lots of warnings if Makefile.PL detects an old version
> installed. This is my favoured solution, not least because it means
> minimal work for me (if you suggest an alternate solution do bear this
> in mind - I do this stuff for free).
>
> What are your thoughts?
>
> Make sure you CC me in all replies as I don't subscribe, but keep posts
> on-list so they are archived.
>
> Matt.
>
According to the SQLite site it seems to be as easy as:
sqlite OLD.DB .dump | sqlite3 NEW.DB
I do not think it is unreasonable that a one-time conversion be done.
Would it be possible to check the db version and a warning be thrown?
Something like "This version of DBD::SQLite only works with version 3 or
higher. Please see the SQLite home page for conversion information."
Just random thoughts...
Robert