Skip to content

False positive for enum without DB column

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Rails enforces that all enum attributes are backed by a DB column. We patched this behavior to not raise an exception.

In !199697 (merged), we removed this patch and went back to the Rails default behavior.

After this, we started seeing errors in production relating to missing DB columns even though the columns exist: https://new-sentry.gitlab.net/organizations/gitlab/issues/?alert_rule_id=13&alert_type=issue&environment=gprd&notification_uuid=95af9f9f-114e-4581-a7e3-6a246641a478&project=3&query=is%3Aunresolved+Undeclared+attribute+type+for+enum&referrer=issue-list&statsPeriod=14d

Though the errors happen very rarely.

Edited by 🤖 GitLab Bot 🤖