diff --git a/rudder-webapp/SOURCES/rudder-upgrade b/rudder-webapp/SOURCES/rudder-upgrade index 4d388bd97..b1782a0ca 100755 --- a/rudder-webapp/SOURCES/rudder-upgrade +++ b/rudder-webapp/SOURCES/rudder-upgrade @@ -60,6 +60,7 @@ set -e # - 2.4.0 : Disable base.url attribute in rudder-web.properties # - 2.4.0 : Update logback.xml in order to have information about name historization # - 2.4.1 : Add the group serialization table (GroupsNodesJoin) to the database +# - 2.4.8 : Remove the user name length limitation in the event log table ##################################################################################### # Some variables @@ -597,5 +598,11 @@ if [ $RES -eq 0 ]; then psql -q -U rudder -h localhost -d rudder -f ${RUDDER_UPGRADE_TOOLS}/dbMigration-2.4-2.5-group-serialisation.sql > /dev/null fi +# - 2.4.8: Remove the user name length limitation in the event log table +RES=$(su - postgres -c "psql -d rudder -t -c \"select count(*) from INFORMATION_SCHEMA.COLUMNS where column_name='principal' and table_name = 'eventlog' and data_type = 'character varying'\"") +if [ $RES -ne 0 ]; then + psql -q -U rudder -h localhost -d rudder -f ${RUDDER_UPGRADE_TOOLS}/dbMigration-2.4-2.4-eventlog-unlimited-principal-length.sql > /dev/null +fi + # For every upgrade, we force the root server to run a new inventory on the next CFEngine run touch /opt/rudder/etc/force_inventory diff --git a/rudder-webapp/SPECS/rudder-webapp.spec b/rudder-webapp/SPECS/rudder-webapp.spec index 495369047..99dc347b5 100644 --- a/rudder-webapp/SPECS/rudder-webapp.spec +++ b/rudder-webapp/SPECS/rudder-webapp.spec @@ -167,6 +167,7 @@ cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-2.3-2.4-archive.sql %{buildroot}%{rudderdir}/share/upgrade-tools/ cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-2.3-2.4-index-archive.sql %{buildroot}%{rudderdir}/share/upgrade-tools/ cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-2.4-2.5-group-serialisation.sql %{buildroot}%{rudderdir}/share/upgrade-tools/ +cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-2.4-2.4-eventlog-unlimited-principal-length.sql %{buildroot}%{rudderdir}/share/upgrade-tools/ cp %{_sourcedir}/rudder-upgrade-LDAP-schema-2.3-2.4-add-entries.ldif %{buildroot}%{rudderdir}/share/upgrade-tools/ cp %{_sourcedir}/rudder-upgrade-LDAP-schema-2.3-2.4-add-archives-entry.ldif %{buildroot}%{rudderdir}/share/upgrade-tools/ diff --git a/rudder-webapp/debian/rules b/rudder-webapp/debian/rules index cb52d467f..0987c352b 100755 --- a/rudder-webapp/debian/rules +++ b/rudder-webapp/debian/rules @@ -94,6 +94,8 @@ binary-arch: install dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-2.3-2.4-archive.sql /opt/rudder/share/upgrade-tools/ dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-2.3-2.4-index-archive.sql /opt/rudder/share/upgrade-tools/ dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-2.4-2.5-group-serialisation.sql /opt/rudder/share/upgrade-tools/ + dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-2.4-2.4-eventlog-unlimited-principal-length.sql /opt/rudder/share/upgrade-tools/ + dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-upgrade-LDAP-schema-2.3-2.4-add-entries.ldif /opt/rudder/share/upgrade-tools/ dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-upgrade-LDAP-schema-2.3-2.4-add-archives-entry.ldif /opt/rudder/share/upgrade-tools/