[odb-users] make integer field autoincrement when it wasn't

Boris Kolpackov boris at codesynthesis.com
Mon Jul 1 09:57:22 EDT 2024


MM <finjulhich at gmail.com> writes:

> But when I add it, odb errors with:
> "error: changing object id auto kind in an existing class is not supported
> info: consider re-implementing this change by adding a new class with the
> desired object id auto kind, migrating the data, and deleting the old class"

Right, there is no way to do this migration automatically (i.e., there
is no ALTER COLUMN ... ADD AUTOINCREMENET or some such).


> Can I manually hack around this?  ie I edit the old xmls? and then edit the
> database myself?

Yes, you can, provided you don't expect the automatic migration from
databases without auto to work magically somehow.



More information about the odb-users mailing list