[PDB-3400] change all varchar columns to text Created: 2017/04/04  Updated: 2018/08/24  Resolved: 2017/08/22

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 5.1.0

Type: Improvement Priority: Normal
Reporter: Wyatt Alt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Team: Data Platform
Sprint: Data Platform 2017-08-09, Data Platform 2017-08-23
Release Notes: Bug Fix
Release Notes Summary: Some text fields in puppetdb (notably report.config_version) had artificial size limits applied to them in the database schema. These limits have been removed.
QA Risk Assessment: Needs Assessment

 Description   

A user in Slack was having issues processing reports due to the config_version field containing values that exceeded the size of a varchar 255. It turned out that their report configuration_version was longer than 255 characters because it included git messages and links, which they were rendering in puppetboard as clickable commit messages back to github.

I don't see a reason for the character limit and the usecase seems interesting - we should just drop it.

We should do the same for containing_class, since we already use text for resource titles and these can get long as well. I think with puppet_version we're probably safe for now.

Edit: Really we should consider whether we need varchars for anything at this point. None of our varchar columns are enforcing any kind of correctness rules and postgres won't make a distinction from a storage space perspective as far as I know. file paths are also limited in PDB to 1024 characters, which is not technically sound either.


Generated at Tue Aug 20 09:43:54 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.