Skip to content

Commit

Permalink
Merged in bugfix/shibui-2404 (pull request #619)
Browse files Browse the repository at this point in the history
race condition between changelog and ShibPropertiesBootstrap

Approved-by: Dmitriy Kopylenko
Approved-by: Charles Hasegawa
  • Loading branch information
sporth authored and chasegawa committed Sep 26, 2022
2 parents d4589af + 8c45ee7 commit e0f1808
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package edu.internet2.tier.shibboleth.admin.ui.domain;

import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Type;
import org.hibernate.envers.Audited;

import javax.annotation.Nullable;
Expand All @@ -18,6 +19,7 @@ public class Description extends AbstractXMLObject implements org.opensaml.saml.

@Column(name = "descriptionValue")
@Lob
@Type(type = "org.hibernate.type.TextType")
private String value;

@Nullable
Expand Down
26 changes: 23 additions & 3 deletions backend/src/main/resources/db/changelog/changelog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ 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'users'
-- 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;
Expand All @@ -219,7 +219,7 @@ GO

-- 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'users'
-- 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;
Expand All @@ -229,10 +229,30 @@ 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'users'
-- 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

0 comments on commit e0f1808

Please sign in to comment.