dotCMS / dotCMS/core

dot_cluster.cluster_id varchar(36) too small — widen to varchar(255)

Open
#36,175 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Platform Type : Defect
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

The cluster_id column in the dot_cluster table is defined as varchar(36) (created in Task03015CreateClusterConfigModel), sized for a UUID. This is too small for deployments that use a human-readable / externally-supplied cluster identifier.

Proposed fix

Add an idempotent run-once startup task that widens dot_cluster.cluster_id to varchar(255).

  • Idempotency via forceRun() checking the current column length.
  • Integration test verifying the widen + idempotency.

Notes

  • Postgres FKs on varchar are length-agnostic, so the cluster_server.cluster_id FK does not need to change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Task03015CreateClusterConfigModel and the startup-task conventions in the Java codebase. Inspect the dot_cluster schema and the existing cluster_server foreign key, then add the requested run-once migration and integration test. Done means cluster_id accepts varchar(255) and rerunning the task leaves the schema unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.