Skip to content

model: Make message field optional in Release model

A release may have an empty message, for instance those derived from a Mercurial repository.

12:45 $ psql service=swh-replica
psql (11.7 (Debian 11.7-0+deb10u1))
Connexion SSL (protocole : TLSv1.3, chiffrement : TLS_AES_256_GCM_SHA384, bits : 256, compression : désactivé)
Saisissez « help » pour l'aide.

softwareheritage=> select id from release where comment is NULL limit 10;
                     id                     
--------------------------------------------
 \xc581a993393d1b61fc7f3964014313734cb4fec1
 \xdab5a0841cf00e46861e15198dd0e57f1a5ca5f9
 \xd39288723941ecaf18b5231377c9885a446d6b59
 \xc61eaa2cbd1438ae60551b8ef3aea2c5da939aae
 \x7acc3693e4661e419d140769f18fb4d2084c7db2
 \xbed8489aedbe51e646440cfd5b49f2f43eb20555
 \x68f7ceeaea00deddbf15e17bb1414eb7725c89d7
 \xc471bbed0a05d8f822a820744f05754140c51893
 \x3d74278a26b139adcee267a49d1542c14dfe1f31
 \x39eeabe99031ba4803986e7dfc816ec15b4151c4
(10 lignes)

So make that field optional to avoid type validation errors.


Migrated from D2945 (view on Phabricator)

Merge request reports