Topic: setting sequence start
We're porting an older app to rails and want to bring as much of the old data with us as possible. As I've examined the problem I see that the easiest thing to do would be to bring the old data over as directly as possible, keeping the old ID values since converting them all could be very time consuming to code and debug. I'd like to run my migration, import the old data and then have any new objects created use sequence values ABOVE those used in the imported data. The issue I have is that I can't figure out how to set the starting value of the sequences in rails. In SQL I'd do something like:
CREATE SEQUENCE my_seq START WITH 50000 INCREMENT BY 1;
and ideally it would work with the migrations. Is this possible? If not, any ideas how to bake this in? I really like the idea of migrations and would like to stick with them.