[sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
Dear all, I don't know whether the behavior is intentional or a bug, so let me describe it (occurs since 3.25): Due to the lack of ALTER TABLE MODIFY COLUMN, I use the following construction: PRAGMA foreign_keys=0 BEGIN TRANSACTION ALTER TABLE x RENAME TO x_old CREATE TABLE IF NOT EXISTS x (...

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Shawn Wagner
You're using a workflow that https://www.sqlite.org/lang_altertable.html explicitly calls out as incorrect and error prone... Try to create a new table, copy data over, drop the original and then rename the new one to see if that fixes the issue. On Wed, Dec 12, 2018, 8:54 AM Thomas Kurz Dear al

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
cited already been there before release 3.25? - Original Message - From: Shawn Wagner To: SQLite mailing list Sent: Wednesday, December 12, 2018, 18:02:54 Subject: [sqlite] ALTER TABLE, modifying columns You're using a workflow that https://www.sqlite.org/lang_altertable.html explicitly

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Richard Hipp
On 12/12/18, Thomas Kurz wrote: > > Btw, has the "correct vs. incorrect" table that you've cited already been > there before release 3.25? The procedure description is unchanged for many years. I added the "Caution:" section recently, because a lot of people have been having the same problem you

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Richard Hipp
On 12/12/18, Thomas Kurz wrote: > This doesn't work either. The error now occurs in the "ALTER TABLE" line, > which is correct as the table "x" being refered to doesn't exist that > moment. Tested with both 3.25.2 and 3.26. Can you please post a script showing us exactly what you are trying to do

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
> I never would have allowed the recent > enhancements to ALTER TABLE that broke it. The enhancements made have been way overdue. Personally, I appreciate them very much and they are worth the "trouble". And I hope that the small problem does not prevent you from taking MODIFY COLUMN and DROP CO