I have to add a migration for adding a column called *position* in the *ordedetails* table
Since this is a sub table with a foreign key of *orderid*, I would like to increment the position starting from 1 in the *position* column grouped on *orderid* So, before the migration if the records are - id orderid 1 1 2 1 3 1 4 2 5 2 6 2 After the migration, the records should be - id orderid position 1 1 1 2 1 2 3 1 3 4 2 1 5 2 2 6 2 3 Any help is appreciated. -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/c8239f59-17e1-43cc-87fd-524e08e0dfbfn%40googlegroups.com.
