You do not have access to this ticket

This project is archived and is in readonly mode.

#1651 ✓duplicate
awendt

Sqlite, sqlite3 bug in add_column when column is primary key (Trac #9385)

Reported by awendt | December 27th, 2008 @ 10:44 PM | in 2.x

This is merely a follow-up for http://dev.rubyonrails.org/ticke..., a ticket filed one year ago. It never got commented.

I just bumped into this as well. Initial problem: I didn't have an id column for primary key in one of my tables. I didn't run into problems with 2.0.2

2.2.2 suddenly introduces a requirement for an id column in validates_uniqueness_of (which itself should be considered a bug, but is of no concern here). So I wrote a migration that gives me

SQLite3::SQLException: Cannot add a PRIMARY KEY column: ALTER TABLE "responses" ADD "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL

The code for 2.0.2 is on http://github.com/awendt/hyggelig, I could push the 2.2.2 code on a branch.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages