I’ve read the messages concerning this issue, but I haven’t come to a
I have a legacy db with data I have to import to my new app, as it is.
So I can’t use the auto-increment “id” my migrations generate.
I’ve done the following:
create_table(:results, :id => false, :primary_key => ‘code’ ) do |t|
t.column :code, :integer
But, in my SQL server, “code” does not appear as primary key.
So, what can I do to make so?
And if I use the set_primary_key in the model, it does not solve
anything… I mean, this primary key in SQL server will not be set to
primary key (so I think I won’t use the migrations at all…)