[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

Boris Kolpackov boris at codesynthesis.com
Mon Oct 27 04:42:55 EDT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: person.hxx
Type: text/x-c++hdr
Size: 4131 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141027/eb3841fb/person.hxx


More information about the odb-users mailing list