[OSM-dev] Error when running rake db:migrate

Dan Karran dan at karran.net
Fri Aug 3 17:52:05 BST 2007


On 8/3/07, Tom Hughes <tom at compton.nu> wrote:
> In message <37d514850708021518t2c89dd71k70878b76ff3a48a at mail.gmail.com>
>           "Dan Karran" <dan at karran.net> wrote:
>
> > I'm trying to update my dev sandbox to the latest db schema but I'm
> > getting errors in the 002 update to do with duplicate primary ids
> > being defined... am I doing something wrong, or missed a step
> > somewhere?
> >
> > -- add_primary_key("current_nodes", ["id"])
> > rake aborted!
> > Mysql::Error: Multiple primary key defined: ALTER TABLE current_nodes
> > ADD PRIMARY KEY (`id`)
>
> Do you somehow already have a primary key on current_nodes? You shouldn't
> have as the previous schema version did not include one.
>
> What does "show indexes for current_nodes" report?

I did have primary keys already set on the current_* tables it would
seem, though I don't know where from. I just started with a fresh db
anyway as I didn't really have anything in there.


Cheers,
Dan

-- 
Dan Karran
dan at karran.net
www.dankarran.com




More information about the dev mailing list