On Thu, 19 Mar 2009 03:39:11 +0200, Tristan Seligmann
<mithra...@mithrandi.net> wrote:

>Divmod Axiom[1] is a Python ORM built on SQLite; one of the book
>keeping tables it creates in the database has a column named
>"indexed", which became a reserved word around SQLite 3.6.4 (?). The
>"obvious" fix for this problem is to simply quote the column name
>using "", but the problem is that it is now impossible to load older
>databases which didn't have the column created with the name quoted:
>
>Error: malformed database schema (axiom_attributes) - near "indexed":
>syntax error
>
>What sort of migration path exists for converting / fixing these old
>databases? Ideally there would be some mechanism that does not require
>reinstalling an older version of SQLite.

Digging in the mailing list archives, I found this:

==========================================
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] FTS and upgrades
From: d...@hwaci.com
Date: Tue, 10 Jul 2007 22:26:21 +0000

I probably shouldn't tell you this, but....

There is a pragma:

   PRAGMA writable_schema=ON;

Which when enabled allows you to UPDATE or 
DELETE against the sqlite_master table.
==========================================

Using this PRAGMA, you can UPDATE the sql column in the
sqlite_master table. Of course this is undocumented and
unsupported, and you risk corrupting your databases.
Backups and rigorous testing required.
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to