java.lang.Object
edu.internet2.middleware.grouper.app.upgradeTasks.UpgradeTaskV43
All Implemented Interfaces:
UpgradeTasksInterface

public class UpgradeTaskV43 extends Object implements UpgradeTasksInterface
v7 upgrade task that bundles the DDL changes shipping in this release (one task per release; add new release DDL here rather than creating another task).

GRP-6653: add unique CONSTRAINTS on oracle for the surrogate internal_id / id_index columns that foreign keys reference (a bare unique index is not a valid FK parent key on oracle - ORA-02270). Each reuses its existing unique index via USING INDEX. Oracle-only: postgres and mysql accept the unique index itself as a FK target. This mirrors how UpgradeTaskV41 already adds grouper_sync_internal_id_unq; these constraints are managed here in the upgrade task (not the ddlutils database-compare model).

GRP-7076: widen the group-as-subject identifier and folder-name columns from varchar(255) to varchar(1024) so they line up with grouper_groups.name (already 1024):

  • grouper_members.subject_identifier0 / grouper_pit_members.subject_identifier0 - a group (source g:gsa) stores its fully-qualified name here; a 256-1024 char name used to overflow this column and fail the group create with an opaque JDBC error.
  • grouper_stems.name / display_name / alternate_name - so deeply nested folder paths are not capped at 255.

Per-database behavior (views only block postgres):

  • oracle - ALTER ... MODIFY (col VARCHAR2(1024)); dependent views auto-invalidate and recompile, indexes stay full-column.
  • mysql - at 1024 chars these indexes exceed the InnoDB key-length limit, so for each affected index: DROP INDEX, MODIFY the column (preserving nullability), then recreate the index as a (255) prefix.
  • postgres - ALTER COLUMN ... TYPE is blocked by the dependent views, and dropping/ recreating that view set during an upgrade is risky. We deliberately do NOT auto-run the postgres widening; instead this task reports it as having no automatic DDL work (so the upgrade is never blocked) and logs a loud reminder. The widening is a documented manual DBA task - see the release notes for the drop-view / alter / recreate-view SQL.

GRP-7057: add the missing primary key grouper_stem_v_priv_pk on grouper_stem_view_privilege (member_uuid, stem_uuid, object_type). All three columns are NOT NULL and the triple is already the Hibernate composite-id, so the constraint matches existing write behavior (existence-guarded inserts, full-triple deletes, no updates). Identical ADD CONSTRAINT SQL on all three databases; idempotent via a live primary-key-existence check.