[odb-users] make integer field autoincrement when it wasn't
MM
finjulhich at gmail.com
Mon Jul 1 14:45:20 EDT 2024
On Mon, 1 Jul 2024 at 14:57, Boris Kolpackov <boris at codesynthesis.com>
wrote:
> 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.
Yes, that's fine.
But when I add *auto *to the odb pragma, the odb compiler doesn't let me
progress.
There's the use of existing xml files I think for schema evolution.
what steps do I follow to hack this in?
1. edit the xml
2. add auto to the #pragma id
3. run odb?
4. update the sql database manually?
is this the right order?
MM
More information about the odb-users
mailing list