diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java index 69e860302..0c02facbf 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java @@ -3,12 +3,14 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import edu.internet2.tier.shibboleth.admin.util.EmptyStringToNullConverter; import lombok.Data; +import org.hibernate.annotations.Type; import org.hibernate.envers.Audited; import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.Id; +import javax.persistence.Lob; import java.util.UUID; @Entity(name = "shib_configuration_prop") @@ -29,8 +31,9 @@ public class ShibConfigurationProperty { @Convert(converter = EmptyStringToNullConverter.class) String defaultValue; - @Column(name = "description") - @Convert(converter = EmptyStringToNullConverter.class) + @Lob + @Type(type = "org.hibernate.type.TextType") + @Convert(converter = EmptyStringToNullConverter.class, disableConversion = true) String description; @Column(name = "idp_version", nullable = false) diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql index 9cbf7e5ef..c01ba0e03 100644 --- a/backend/src/main/resources/db/changelog/changelog.sql +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -204,12 +204,56 @@ GO ALTER TABLE description ALTER COLUMN description_value TEXT; GO +ALTER TABLE description_aud ALTER COLUMN description_value TEXT; +GO + +-- changeset liquibase:1.13.2.1 dbms:mariadb,mysql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop MODIFY COLUMN description LONGTEXT; +GO +ALTER TABLE shib_configuration_prop_aud MODIFY COLUMN description LONGTEXT; +GO --- changeset liquibase:1.13.0.3 dbms:mssql +-- changeset liquibase:1.13.2.1 dbms:postgresql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop ALTER COLUMN description TYPE TEXT; +GO +ALTER TABLE shib_configuration_prop_aud ALTER COLUMN description TYPE TEXT; +GO + +-- changeset liquibase:1.13.2.1 dbms:mssql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop ALTER COLUMN description TEXT; +GO +ALTER TABLE shib_configuration_prop_aud ALTER COLUMN description TEXT; +GO + +-- changeset liquibase:1.13.3.1 dbms:postgresql -- preconditions onFail:MARK_RAN -- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' -- comment: /* we don't need to run this if the system is new */ +ALTER TABLE description ALTER COLUMN description_value TYPE TEXT; +GO +ALTER TABLE description_aud ALTER COLUMN description_value TYPE TEXT; +GO + +-- changeset liquibase:1.13.3.1 dbms:mssql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE description ALTER COLUMN description_value TEXT; +GO ALTER TABLE description_aud ALTER COLUMN description_value TEXT; GO