[typo] Migrate Problems

Mitch Pirtle mitch at spacemonkeylabs.com
Mon Aug 20 11:27:44 EDT 2007

Quoting James Carscadden <james at carscadden.org>, who spaketh thusly:

> Hi folks..,
>     I'm trying to upgrade from an old typo (4.0.3) to the new 4.1.1
> having problems in the db:migrate though.
>    Specifically:
>    == CleanupContentsTable: migrating
> ============================================
> -- remove_index(:contents, :article_id)
> -- remove_column(:contents, :article_id)
> rake aborted!
> SQLite3::SQLException: table contents has no column named article_id:
> CREATE  INDEX "altered_contents_article_id_index" ON contents
> ("article_id")
>    Obviously I'm using SQLite database.

That error is because SQLite is trying to create an index for a column  
that doesn't exist in your database.

My experience with SQLite in the past was similar, and when I switched  
to a different database (didn't matter what) everything worked again.  
Experimentation taught me that SQLite doesn't like SQL statements that  
alter tables or columns - or at least doesn't like them as much as  
other DBMS.

-- Mitch

More information about the Typo-list mailing list