Muffinresearch Labs by Stuart Colville

Sqlite: ALTER TABLE ADD COLUMN fail on OSX 10.4 | Comments (1)

Posted in Code on 5th February 2008, 11:03 pm by Stuart

I’ve been playing with some stuff in Django recently and having updated a model I wanted to add a column to the sqlite database. Unfortunately ALTER TABLE ADD COLUMN statements don’t work in sqlite3.1.3 which is the version installed in Tiger and all you’ll get is a SQL error message.

sqlite> ALTER TABLE snippets_snippet ADD COLUMN 'code' text;
SQL error: near "ADD": syntax error

So how to fix this? Good news fink install sqlite3 will get you version 3.2.8 and you’ll find it in /sw/bin/sqlite3

Post Tools

Comments: Add yours

1. On March 8th, 2010 at 2:15 am Fábio said:

well, it is a very long time since you post your question … but I guess the error is because the ‘ signal after the COLUMN instruction … I think the correct form is:

ALTER TABLE snippets_snippet ADD COLUMN code text;







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.604s.