Constructor

GomCustomMigrationnew

Declaration

GomMigration*
gom_custom_migration_new (
  guint version,
  GomCustomMigrationFunc apply_func,
  gpointer user_data,
  GDestroyNotify user_destroy
)

Description

Creates a new GomCustomMigration that invokes apply_func when gom_migration_apply() is called.

If apply_func is NULL, applying the migration succeeds immediately with no work done.

Parameters

version

Type: guint

The migration version number.

apply_func

Type: GomCustomMigrationFunc

Callback to run when the migration is applied.

The argument can be NULL.
user_data

Type: gpointer

User data to pass to apply_func.

The argument can be NULL.
The data is owned by the caller of the function.
user_destroy

Type: GDestroyNotify

Destroy notify for user_data.

The argument can be NULL.

Return value

The caller of the function takes ownership of the data, and is responsible for freeing it.