On 3/9/07, Scott Hess <[EMAIL PROTECTED]> wrote:
On 3/9/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote:
> I'm looking into ways of changing the schema type name when I do my
> SQLite2->SQLite3 conversion. Most likely I'll have to pipe the .dump
> from the SQLite2 db through a program to replace 'varchar' with
> 'text'... I'm working on that now!

You could also write something to spelunk through the metadata and
alter things to fit.  Use 'pragma table_info(table)' to get info about
the table, then for each table you want to change, within a
transaction create a new table just like the old table with the
appropriate changes, use insert-from-select syntax to move the data to
the new table, delete the old table, rename the new table to the old
name, and commit the transaction.  This might not be much fun if your
database is very very large, though.

Hmmm.. That's not a bad idea. I could do that all in-code. I'm using
the ODBC driver to access the SQLite database but I guess that's no
big deal. I'd say the biggest database will be in the 30-50 meg range.
They're not huge (unless 30 meg is considered huge.. eek..)

Thanks!!

--
- Mitchell Vincent
- K Software - Innovative Software Solutions
- Visit our website and check out our great software!
- http://www.ksoftware.net

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to