Skip to content

Commit

Permalink
SHIBUI-2273
Browse files Browse the repository at this point in the history
Updates: added missing tables and aud tables to the sql updates, updated the springboot and hibernate versions to newer versions, updated the settings to work with the newer version of springboot which uses a different library for path pattern matching.
  • Loading branch information
chasegawa committed Jun 15, 2022
1 parent fed625a commit 70d7ecd
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EntityAttributesFilterTarget extends AbstractAuditable implements I

@ElementCollection (fetch = FetchType.EAGER)
@OrderColumn
@Column(length = 760)
@Column(length = 760, name="target_value")
private List<String> value;

public EntityAttributesFilterTargetType getEntityAttributesFilterTargetType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.hibernate.envers.AuditOverride;
import org.hibernate.envers.Audited;

import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.OrderColumn;
Expand All @@ -27,6 +28,7 @@ public class NameIdFormatFilterTarget extends AbstractAuditable implements IFilt

@ElementCollection
@OrderColumn
@Column(name="target_value")
private List<String> value;

public NameIdFormatFilterTargetType getNameIdFormatFilterTargetType() {
Expand Down
4 changes: 4 additions & 0 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ logging.level.org.springframework=INFO
logging.level.edu.internet2.tier.shibboleth.admin.ui=INFO

spring.main.allow-bean-definition-overriding=true
# "In Spring MVC, the path was previously analyzed by AntPathMatcher, but it was changed to use PathPatternParser introduced in WebFlux from Spring 5.3.0."
# we still have the option to use ant path matcher thus keeping existing configuration from having to change
spring.mvc.pathmatch.matching-strategy=ant_path_matcher

# Database Credentials
spring.datasource.username=shibui
Expand Down Expand Up @@ -109,6 +112,7 @@ shibui.roles.authenticated=ADMIN,ENABLE,USER
#docker container
shibui.beacon-enabled=true

### Swagger/Springdoc patterns
springdoc.use-management-port=true
springdoc.swagger-ui.tagsSorter: alpha
springdoc.writer-with-order-by-keys: true
Expand Down
67 changes: 62 additions & 5 deletions backend/src/main/resources/db/changelog/changelog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,95 @@
-- 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 resource_backed_metadata_resolver
RENAME "file" TO "file_resource";
ALTER TABLE custom_entity_attr_list_items
RENAME "value" TO "item_value";
GO
ALTER TABLE custom_entity_attr_list_items_aud
RENAME "value" TO "item_value";
GO
ALTER TABLE entity_attributes_filter_target_value
RENAME "value" TO "target_value";
GO
ALTER TABLE entity_attributes_filter_target_value_aud
RENAME "value" TO "target_value";
GO
ALTER TABLE name_id_format_filter_target_value
RENAME "value" TO "target_value";
GO
ALTER TABLE name_id_format_filter_target_value_aud
RENAME "value" TO "target_value";
GO
ALTER TABLE organizationurl
RENAME "value" TO "uri_value";
GO
ALTER TABLE organizationurl_aud
RENAME "value" TO "uri_value";
GO
ALTER TABLE organization_display_name
RENAME "value" TO "name_value";
GO
ALTER TABLE organization_display_name_aud
RENAME "value" TO "name_value";
GO
ALTER TABLE organization_name
RENAME "value" TO "name_value";
GO
ALTER TABLE organization_display_name
ALTER TABLE organization_name_aud
RENAME "value" TO "name_value";
GO
ALTER TABLE resource_backed_metadata_resolver
RENAME "file" TO "file_resource";
GO
ALTER TABLE resource_backed_metadata_resolver_aud
RENAME "file" TO "file_resource";
GO
ALTER TABLE service_description
RENAME "value" TO "name_value";
GO
ALTER TABLE service_description_aud
RENAME "value" TO "name_value";
GO
ALTER TABLE service_name
RENAME "value" TO "name_value";
GO
ALTER TABLE service_name_aud
RENAME "value" TO "name_value";
GO


-- changeset liquibase:1.11.0 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 */
EXEC sp_rename 'custom_entity_attr_list_items.value', item_value, 'COLUMN'
GO
EXEC sp_rename 'custom_entity_attr_list_items_aud.value', item_value, 'COLUMN'
GO
EXEC sp_rename 'entity_attributes_filter_target_value.value', target_value, 'COLUMN'
GO
EXEC sp_rename 'entity_attributes_filter_target_value_aud.value', target_value, 'COLUMN'
GO
EXEC sp_rename 'name_id_format_filter_target_value', target_value, 'COLUMN'
GO
EXEC sp_rename 'name_id_format_filter_target_value_aud', target_value, 'COLUMN'
GO
EXEC sp_rename 'organizationurl.value', uri_value, 'COLUMN'
GO
EXEC sp_rename 'custom_entity_attr_list_items.value', item_value, 'COLUMN'
EXEC sp_rename 'organizationurl_aud.value', uri_value, 'COLUMN'
GO
EXEC sp_rename 'organization_display_name.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'organization_display_name_aud.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'organization_name.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'organization_display_name.value', name_value, 'COLUMN'
EXEC sp_rename 'organization_name_aud.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'service_description.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'service_description_aud.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'service_name.value', name_value, 'COLUMN'
GO
EXEC sp_rename 'service_name_aud.value', name_value, 'COLUMN'
GO
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ version=1.11.0-SNAPSHOT
### library versions ###
commonsCollections4Version=4.4
cryptacularVersion=1.2.4
hibernateVersion=5.5.0.Final
#hibernateVersion=5.6.9.Final
#hibernateVersion=5.5.0.Final
hibernateVersion=5.6.9.Final
luceneVersion=8.1.1
log4JVersion=2.17.2
lombokVersion=5.3.3.3
opensamlVersion=4.2.0
pac4JVersion=5.4.3
pac4jSpringSecurityVersion=7.0.3
shibbolethVersion=4.2.1
springbootVersion=2.5.12
#springbootVersion=2.7.0
#springbootVersion=2.5.12
springbootVersion=2.7.0
springSecurityVersion=5.6.3
# springSecurityVersion=5.7.1

Expand Down

0 comments on commit 70d7ecd

Please sign in to comment.