[odb-users] error: SQLite does not support altering of columns. info: first altered column is 'password' in table 'user', but field password is not being altered

Rafal Gm grasmanek94 at gmail.com
Mon Oct 27 06:18:32 EDT 2014


I did forget to say that my default.options has this:

-IC:\Programs\Boost\153\include
-IC:\development\SampGamemode\lib\odb\libodb-2.3.0
--std c++11
--generate-schema
--generate-query

And seems to work now, also, I just moved the code that doesn't change that
much to the top as much as possible in the class and my current file
compiles too. thanks for the help :)

2014-10-27 9:42 GMT+01:00 Boris Kolpackov <boris at codesynthesis.com>:

> Hi Rafal,
>
> Rafal Gm <grasmanek94 at gmail.com> writes:
>
> > Hello, I am trying to use the database migration features of ODB on
> which I
> > have been waiting a long time, but for some reason it gives alter errors
> > after adding one more integer column to the database.
> >
> > This is my version 1_1 class:
> >
> > [...]
> >
> > and this is the next version:
> >
> > [...]
> >
> > When I throw the file onto the ODB compiler with the following command:
> >
> > tools\bin\odb.exe -d sqlite %filename%
> >
> > I get the following errors:
> > error: SQLite does not support altering of columns
> > info: first altered column is 'password' in table 'user'
>
> First of all, if you really used the above command, you couldn't have
> gotten this error. You need to turn on database schema generation to
> enable schema evolution support (-s/--generate-schema option).
>
> Here is what I have done: I've copy-and-pasted the two versions of
> your class into a file called person.hxx (attached):
>
> #ifdef V1
>
> // version 1
>
> #else
>
> // version 2
>
> #endif
>
> I then compiled it like so:
>
> rm person.xml
> odb -d sqlite -s -DV1 person.hxx
> person.xml: info: initializing changelog with base version 1
> odb -d sqlite -s -DV2 person.hxx
>
> I got no errors and examining the changelog (person.xml) indicates
> that everything works as expected.
>
> Can you try this exact test yourself and see if you still get an
> error?
>
> Boris
>


More information about the odb-users mailing list