Skip to content

Geo: Change not yet used text columns to varchar with limit

Follow up !56446 (comment 527718411):

@ibaum is this something we could change on the lfs still? Not a huge deal if it isn't.

@alexives Good point on LFS. If we can delete and readd an unused column without performance issue (I believe it's fine, but note that the table itself already exists and may be in-use and large for some customers) then we should probably do that.

Also we can definitely do group wiki repo registry since it was only just merged and is not yet released.

Problem

At the moment, the schema doesn't implement text limit constraints, so new installations are creating registry tables with unlimited text fields.

There are two cases:

  • lfs_object_registry.last_sync_failure
  • group_wiki_repository_registry.last_sync_failure

where we still have the opportunity to change them in %13.10 from text to string/varchar.

Note that in the future in #323806, we will transition the Geo tracking DB from ee/db/geo/schema.rb to a structure.sql so we can use text columns with limit.

Proposal

  • Modify lfs_object_registry.last_sync_failure from text to string/varchar: !56453 (closed)
  • Modify group_wiki_repository_registry.last_sync_failure from text to string/varchar: !56455 (closed)
  • Be careful: geo.staging.gitlab.com and developer instances will already have these columns so we can't just retroactively change the types
Edited by Michael Kozono