Skip to content

Commit

Permalink
SHIBUI-2341
Browse files Browse the repository at this point in the history
Adding capacity to handle long character descriptions
  • Loading branch information
chasegawa committed Aug 30, 2022
1 parent 313b466 commit 16e5009
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.annotation.Nullable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;

@Entity
@EqualsAndHashCode(callSuper = true)
Expand All @@ -16,6 +17,7 @@ public class Description extends AbstractXMLObject implements org.opensaml.saml.
private String xmlLang;

@Column(name = "descriptionValue")
@Lob
private String value;

@Nullable
Expand All @@ -39,4 +41,4 @@ public String getValue() {
public void setValue(@Nullable String value) {
this.value = value;
}
}
}
22 changes: 21 additions & 1 deletion backend/src/main/resources/db/changelog/changelog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,24 @@ update file_backed_http_metadata_resolver_aud set max_refresh_delay ='PT4H';
update resource_backed_metadata_resolver set min_refresh_delay ='PT5M';
update resource_backed_metadata_resolver_aud set min_refresh_delay ='PT5M';
update resource_backed_metadata_resolver set max_refresh_delay ='PT4H';
update resource_backed_metadata_resolver_aud set max_refresh_delay ='PT4H';
update resource_backed_metadata_resolver_aud set max_refresh_delay ='PT4H';

-- changeset liquibase:1.13.0.1 dbms:mariadb,mysql
-- 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 descriptionValue LONGTEXT;
GO
ALTER TABLE description)aud ALTER COLUMN descriptionValue LONGTEXT;
GO

-- changeset liquibase:1.13.0.2 dbms:postgresql,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 descriptionValue TEXT;
GO
ALTER TABLE description_aud ALTER COLUMN descriptionValue TEXT;
GO

0 comments on commit 16e5009

Please sign in to comment.