Postgres error when attempting to create build

We’re having some recent troubles starting new builds for one of our repositories. We get this error, but there is no information about what column is exceeding the allowed length. Builds in this repo and branch worked as recently as 6 hours ago, and we’ve made no significant changes to anything, beyond adding some new pipelines, that have short names below 50 characters each.

Log (with repo info removed):
"error":"pq: value too long for type character varying(50)","event":"push","level":"error","msg":"trigger: cannot create build"

Update: We determined that the problem was that a pipeline name was 52 characters long, which is longer than the stage_name field in the stages, Can this either have a nice ui error to handle this case, or the column be expanded to be less likely to be hit?

For the time being, we’ve made our pipeline name shorter

The size of the stage name column was increased in newer versions of Drone, however, this change is only available when performing a fresh install, using an empty database. You can manually run the following postgres command to increase the column size:

ALTER TABLE stages ALTER COLUMN stage_name TYPE varchar(200);