Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Primary Keys Fail

#236

I seem to get this no matter what I do:

-- change_column("bj_config", :bj_config_id, :primary_key)

rake aborted!

Mysql::Error: #42000Multiple primary key defined: ALTER TABLE `bj_config` CHANGE `bj_config_id` `bj_config_id` int(11) DEFAULT NULL auto_increment PRIMARY KEY DEFAULT NULL

Here is the problem table:

    create_table "bj_config", :primary_key => "bj_config_id", :force => true do |t|
      t.string "hostname"
      t.string "key"
      t.text   "value"
      t.text   "cast"
    end

When I removed the :primary_key, it worked.

I dropped the database and recreated it and still kept getting this problem.

Reported by Jacques Crocker · July 7th, 2008 @ 04:04 PM

State: new
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.