Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-15 Thread Scott Hess
ROTECTED] > Sent: Tuesday, August 14, 2007 8:22 PM > To: [EMAIL PROTECTED] > Cc: sqlite-users@sqlite.org > Subject: Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY. > > On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Scott Hess" <[EMAIL PR

RE: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread Samuel R. Neff
:[EMAIL PROTECTED] Sent: Tuesday, August 14, 2007 8:22 PM To: [EMAIL PROTECTED] Cc: sqlite-users@sqlite.org Subject: Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY. On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Scott Hess" <[EMAIL PROTECTED]> wrote: > >

Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread drh
"Scott Hess" <[EMAIL PROTECTED]> wrote: > > > > 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

Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread Scott Hess
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

Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread Joe Wilson
--- [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;

Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread Joe Wilson
--- Scott Hess <[EMAIL PROTECTED]> wrote: > This may mean that I'll need to branch fts2 to fts3 and deprecate > fts1/2 as being not safe for use. If the code is going to have to > create new tables and populate them, then there's not a lot of gain > versus just having the developer do that. Is

Re: [sqlite] ALTER TABLE and INTEGER PRIMARY KEY.

2007-08-14 Thread drh
"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. >