View Issue Details

IDProjectCategoryView StatusLast Update
0005992Talermerchant backendpublic2024-01-12 13:06
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.7.0Fixed in Version0.7.0 
Summary0005992: merchant and exchange database should have version information for future schema migration support
DescriptionCurrently, there is no way to find out which schema version the exchange/merchant database uses.

There are a variety of approaches to versioning:

a) have a "metadata" table that stores the version number
b) suffix the schema version name to the name of the table
c) use the "CREATE SCHEMA myschema;" mechanism of posgres, which is similar to approach (b) but separates the tables from different schema versions better.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2019-12-14 22:39

manager   ~0015164

https://gitlab.com/depesz/Versioning seems like a sane way of doing (a).

I also think the suggestion from
https://enterprisecraftsmanship.com/posts/database-versioning-best-practices/
to basically keep all schema changes in immutable ".sql" files makes sense. Doing
this would require modifications to the plugins to load/run ".sql" files instead of
our current SQL-inline-in-C, but at the same time that doesn't seem like a bad idea
anyway.

Christian Grothoff

2019-12-14 22:44

manager   ~0015165

https://code.djangoproject.com/wiki/SchemaEvolution may also contain a relevant discussion.

Christian Grothoff

2020-01-17 02:22

manager   ~0015284

Documented in 9401b42..5e5c881, implemented in GNUnet 874a69b8f8a31eb5cc608c490478adc57681970b and exchange 4b16198b43ccb63a7efc2c170622a69759f8ed8f. Merchant DB is still pending!

Christian Grothoff

2020-01-24 20:16

manager   ~0015299

Merchant DB versioning has been implemented.

Issue History

Date ModifiedUsernameFieldChange
2019-12-12 14:44Florian DoldNew Issue
2019-12-14 22:39Christian GrothoffNote Added: 0015164
2019-12-14 22:44Christian GrothoffNote Added: 0015165
2019-12-23 12:41Christian GrothoffAssigned To => Christian Grothoff
2019-12-23 12:41Christian GrothoffStatusnew => assigned
2019-12-23 12:41Christian GrothoffTarget Version => 0.7.1
2020-01-17 02:22Christian GrothoffNote Added: 0015284
2020-01-17 02:22Christian GrothoffCategoryother => merchant Postgres backend (DB)
2020-01-24 20:16Christian GrothoffStatusassigned => informing
2020-01-24 20:16Christian GrothoffResolutionopen => fixed
2020-01-24 20:16Christian GrothoffFixed in Version => 0.7.0
2020-01-24 20:16Christian GrothoffNote Added: 0015299
2020-01-24 20:16Christian GrothoffTarget Version0.7.1 => 0.7.0
2020-03-31 14:04Christian GrothoffStatusinforming => closed
2024-01-12 13:06Christian GrothoffCategorymerchant Postgres backend (DB) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend