[odb-users] Data migration question

Andrew Cunningham odb at a-cunningham.com
Mon Sep 28 12:59:27 EDT 2020


The documentation is not 100% clear on one point about data migration.

As per the example, this function migrates some object types in the
database from any version in the range [MYAPP_BASE_VERSION,2] to version 3

static const odb::data_migration_entry<3, MYAPP_BASE_VERSION>
migrate_gender_entry (&migrate_gender);

What is not 100% clear is what happens when the current database version is
>3 ( say 4). Will this function still be called to migrate the objects or
do I need to update it to

static const odb::data_migration_entry<4, MYAPP_BASE_VERSION>
migrate_gender_entry (&migrate_gender);


More information about the odb-users mailing list