I am deploying a rails app to heroku which uses PostgreSQL as its back-end. In my database migration I normally set the ID field for things likes reports etc to at least 1000, most clients don't seem to like starting at 1.
Normally I use mysql and I simply add an sql specific after my table creation:
def self.up
create_table :reports do |t|
t.references :something
...
end
execute("ALTER TABLE reports AUTO_INCREMENT = 1000;")
end
Does anybody know how I can acheive the same for PostgreSQL, ideally I would like the migration to build the table itself so that's not DB specific.
I guess a silly way of achieving my goal would be to create and delete 999 records in a loop, ouch.