[odb-users] Use of data_migration_entry

Andrew Cunningham odb at a-cunningham.com
Thu May 16 11:47:14 EDT 2019

The  odb::sqlite::database_exception is occurring here  on the SELECT
statement generated as the result of the query call.

      if (e != SQLITE_OK)
        translate_error (e, conn_);

>    odb-sqlite-rd-2.5-vc14.dll!odb::sqlite::statement::init(const char *
text, unsigned __int64 text_size, odb::sqlite::statement_kind sk, const
odb::sqlite::binding * proc, bool optimize) Line 149    C++

& conn, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
text, odb::sqlite::statement_kind sk, const odb::sqlite::binding * process,
bool optimize) Line 78    C++

& conn, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
text, bool process, bool optimize, odb::sqlite::binding & param,
odb::sqlite::binding & result) Line 568    C++

I have a feeling it is something obscure to do with the way my schema
evolved over versions, as another query in another migration callback
,also  for a class that was non-existent in the original schema, executes

On Thu, May 16, 2019 at 8:32 AM Boris Kolpackov <boris at codesynthesis.com>

> Andrew Cunningham <odb at a-cunningham.com> writes:
> > However, when I open a version "1" database, I get an exception as
> > migrate_c () is called.
> > The exception occurs, presumably, the version "1" db schema knows nothing
> > about objects of class "C".
> In this case the database should first be migrated from version 1 to 2
> and then from 2 to 3 at which point migrate_c() should be called.
> Can you print the exception being thrown as well as db.schema_version()
> from inside migrate_c() and see if this sheds any light?

More information about the odb-users mailing list