On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> "Scott Hess" <[EMAIL PROTECTED]> wrote:
> > I was getting ready to checkin the rowid-versus-fts2 fix, and wanted
> > to add one last bit, to upgrade older tables.
> >
> > Unfortunately, code of the form:
> >
> >    ALTER TABLE x_segments ADD id INTEGER PRIMARY KEY;
> >
> > is documented as not supported.
> > http://www.sqlite.org/lang_altertable.html .  As far as I can tell,
> > this means that there is no option to do a cheap schema upgrade to get
> > the correct semantics.  Am I missing a trick?
>
> It appears that you can set
>
>    PRAGMA writable_schema=ON;
>
> Then do a manual UPDATE of the sqlite_master table to insert
> an "id INTEGER PRIMARY KEY" into the SQL for the table definition.
> I tried it and it seems to work.  But it is dangerous.  If you
> mess up, you corrupt the database file.

Ooh, I think that tips me away from fixing fts2, because it's scary
and Google Gears disables PRAGMA.

At least Joe threw in a vote for just versioning things to fts3 -
anyone want to vote against?

-scott

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

Reply via email to