I needed an id field in my rails migration that auto-increments from 0 and not 1.Any idea? Thanks & Cheers !
A:
I found it in mysql Advance option "The initial AUTO_INCREMENT" value for the Table. you can set there but i don't know whether you can set that using Rails Migration or not.
Salil
2010-04-29 08:00:52
Could you please paste the SQL query here?
Shreyas Satish
2010-04-29 08:06:37
A:
Modify your db/migrate-file:
create_table :table_name, :options => "auto_increment = 0" do |t|
...
end
Dennis
2010-04-29 08:59:07