Hi
I'm using RadRails to create my MYSQL databsase tables. This is migration task:
class CreateEvents < ActiveRecord::Migration
def self.up
create_table :events do |t|
t.string :eventname
t.string :evententryurl
t.string :eventurl
t.timestamps
end
end
def self.down
drop_table :events
end
end
I then run a db:migrate Rake task. This creates the following fields within the database table:
id eventname evententryurl eventurl
OK, so far. The problem I have is when I run the application and go to http://localhost/events/new the application is looking for eventid as it's primary key, not id. How can I change my migration task so that it automatically puts eventid into the databaseas the primary key?
Thanks for your time
Sniffer