gboolean purple_sqlite3_run_migrations_from_resources ( PurpleSqlite3* db, const char* path, const char** migrations, GError** error )
Runs the given migrations in the order they are given. The index of each
migration plus 1 is assumed to be the version number of the migration, which
means that you can not change the order of the migrations. The reasoning for
the addition of 1 is because
PRAGMA user_version defaults to 0.
This will attempt to load the migrations via
g_resources_open_stream() by concatenating
path and the individual
migrations. Each migration will be ran in a transaction that
includes updating the schema version, which is stored in
PRAGMA user_version. This means you can’t use
PRAGMA user_version for
Available since: 3.0.0
The sqlite3 connection.
The data is owned by the caller of the function.
The base path in
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
Type: An array of
The list of migrations in the order to run them.
The array must be
The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string.
The return location for a recoverable error.
The argument can be
If the return location is not
NULL, then you must initialize it to a
The argument will left initialized to
NULLby the function if there are no errors.
In case of error, the argument will be set to a newly allocated
GError; the caller will take ownership of the data, and be responsible for freeing it.