I had to migrate from mySql to Ruby to a rails application using postgresql. There is no problem but one, and I do not know how to solve it.
The data transfer brought identifiers along with it, and postgresql now has problems with existing identifiers: it is not clear to me where it gets the value that it uses to determine the base for nextval: this, of course, is not the highest value in the column, although you might think That would be a good idea. In any case, it now encounters existing id values. id created from standard RoR migration is defined as
not null default nextval('geopoints_id_seq'::regclass)
Is it possible to hack some place which value that it uses as a base? Now this problem can occur in any of the 20 or so tables: I could use
'select max(id) from <table_name>'
but this seems to make the idea of ββan auto-increment column pointless.
How is this best handled?
ruby-on-rails postgresql auto-increment
Dan donaldson
source share