sync

Backup service to store encrypted wallet databases (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 0df42cb55f6d2368affbb64b8777bfbd418134e7
parent 1f3cc17a23b181dba9fa7d7a28752f56c251b253
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed,  1 Jul 2026 11:58:20 +0200

Revert "re-add check to refuse to start if schema is not current"

This reverts commit 2d5ee6ab69b8abd8aa607deb45bdc08e4cad3369.

Diffstat:
Msrc/include/sync/sync_database_lib.h | 15+--------------
Msrc/syncdb/syncdb_pg.c | 42+++---------------------------------------
2 files changed, 4 insertions(+), 53 deletions(-)

diff --git a/src/include/sync/sync_database_lib.h b/src/include/sync/sync_database_lib.h @@ -40,20 +40,7 @@ * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure */ enum GNUNET_GenericReturnValue -SYNCDB_init ( - const struct GNUNET_CONFIGURATION_Handle *cfg); - - -/** - * Initialize the sync database subsystem for administration. - * Disables the check that the database schema is current. - * - * @param cfg configuration to use - * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure - */ -enum GNUNET_GenericReturnValue -SYNCDB_init_admin ( - const struct GNUNET_CONFIGURATION_Handle *cfg); +SYNCDB_init (const struct GNUNET_CONFIGURATION_Handle *cfg); /** diff --git a/src/syncdb/syncdb_pg.c b/src/syncdb/syncdb_pg.c @@ -80,16 +80,8 @@ reconnect_cb (struct PostgresClosure *pg_, } -/** - * Initialize the database connection. - * - * @param cfg configuration to use - * @param check_current true to check if the database schema is current - * @return NULL on failure - */ -static enum GNUNET_GenericReturnValue -do_init (const struct GNUNET_CONFIGURATION_Handle *cfg, - bool check_current) +enum GNUNET_GenericReturnValue +SYNCDB_init (const struct GNUNET_CONFIGURATION_Handle *cfg) { pg = GNUNET_new (struct PostgresClosure); pg->cfg = cfg; @@ -106,7 +98,7 @@ do_init (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_SYSERR; } pg->conn = GNUNET_PQ_init (pg->cfg, - "syncdb-postgres", + "merchantdb-postgres", &reconnect_cb, pg); if (NULL == pg->conn) @@ -114,38 +106,10 @@ do_init (const struct GNUNET_CONFIGURATION_Handle *cfg, SYNCDB_fini (); return GNUNET_NO; } - if (check_current && - (GNUNET_OK != - GNUNET_PQ_check_current (pg->conn, - "sync-")) ) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Database schema is not up-to-date. Try running taler-merchant-dbinit or taler-merchant-dbconfig!\n"); - SYNCDB_fini (); - return GNUNET_NO; - } return GNUNET_OK; } -enum GNUNET_GenericReturnValue -SYNCDB_init ( - const struct GNUNET_CONFIGURATION_Handle *cfg) -{ - return do_init (cfg, - true); -} - - -enum GNUNET_GenericReturnValue -SYNCDB_init_admin ( - const struct GNUNET_CONFIGURATION_Handle *cfg) -{ - return do_init (cfg, - false); -} - - void SYNCDB_fini (void) {