Migration from entando 3.0.0 to 3.2.0 - EntandoOldVersions/Entando GitHub Wiki
Step-by-step guide to upgrade your existing 3.0.0 installation to 3.2.0
The purpose of this document is to provide all the information needed in order to upgrade your installation of Entando 3.0.0 to Entando 3.2.0
This document is intended for system administrators who want to upgrade Entando installations.
In order to take maximum advantage from the present document, it is necessary to have basic knowledge about Apache Tomcat servlet container and the PosgreSQL or MySQL DBMS.
This document is a step by step guide to update a base version of Entando 3.0.0 to the latest 3.2.0. It is a responsibility of the developers or the system administrators to port custom developments to the new portal.
Both version are managed with Maven so we are going to take advantage of its characteristics to make the transition process as smooth as possible; basically we are going to:
- instantiate a new portal based on the latest version available
- make porting of the layout, widgets and models to the new portal
In other words we are about to create a new Entando portal with the look of the old version.
For the purpose of the current documents we refer to myPortal as your existing installation of Entando 3.0.0 in a way that the databases used by such application are myPortalPort
and myPortalServ
.
With oldPortal and newPortal we intend the existing installation of myPortal and the new Entando 3.2.0 project we are going to create, respectively.
These two installations are going to share the same artifact ID so that newPortal is ready to use the existing databases.
Please note that this document refers to the upgrade from Entando 3.0.0 to 3.2.0 only: to update older versions please refer to the proper documentation to make incremental upgrade(s) until the version 3.0.0.
Except when otherwise specified, the word system always refers to your Entando installation and not the underlying operating system. Before proceeding with the installation process you are strongly advised to make a full backup of both the system database and the installation directory.
Note: please make sure that the servlet container is not running
-
create a new project, in a directory of choice but different from the one where myPortal resides, with the same artifact ID name of the portal we are going to upgrade.
This is typically done with the Maven command
mvn archetype:generate
; when asked for the name of the artifact type the same name of myPortal, in this case.Do not restore the database! We are going to update the database tables manually. Optionally Entando can be downloaded from our Github page. For further information consult the community wiki.
-
copy the content of the folder oldPortal/src/main/webapp/WEB-INF/aps/jsp/models into newPortal/src/main/webapp/WEB-INF/aps/jsp/models
-
copy the content of the folder oldPortal/src/main/webapp/WEB-INF/aps/jsp/showlets into newPortal/src/main/webapp/WEB-INF/aps/jsp/showlets
-
copy the content of the directory oldPortal/src/main/webapp/resources/static into newPortal/src/main/webapp/resources/static
-
Update the
pom.xml
of the newPortal with all the plugin dependencies of the oldPortal. For example, assume that oldPortal has theFront shortcut
plugin installed: in that case the following dependency must be added to thepom.xml
of newPortal:<dependency> <groupId>org.entando.entando.plugins</groupId> <artifactId>entando-plugin-jpfrontshortcut</artifactId> <version>${entando.version}</version> <type>war</type> </dependency>
-
update the system database with the scripts provided, .
*Postgres Port database
UPDATE showletcatalog SET parameters = '<config> <parameter name="contentType">Content Type (mandatory)</parameter> <parameter name="modelId">Content Model</parameter> <parameter name="userFilters">Front-End user filter options</parameter> <parameter name="category">Content Category **deprecated**</parameter> <parameter name="categories">Content Category codes (comma separeted)</parameter> <parameter name="orClauseCategoryFilter" /> <parameter name="maxElemForItem">Contents for each page</parameter> <parameter name="maxElements">Number of contents</parameter> <parameter name="filters" /> <parameter name="title_{lang}">Showlet Title in lang {lang}</parameter> <parameter name="pageLink">The code of the Page to link</parameter> <parameter name="linkDescr_{lang}">Link description in lang {lang}</parameter> <action name="listViewerConfig"/> </config>' WHERE code = 'content_viewer_list'; INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_NO_SERVICES', 'it', 'Nessun Servizio API disponibile'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_NO_SERVICES', 'en', 'No API Service availables'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_GOTO_SERVICE_LIST', 'it', 'Lista Servizi API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_GOTO_SERVICE_LIST', 'en', 'API Service List'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICES', 'it', 'Servizi API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICES', 'en', 'API Services'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE', 'it', 'Servizio API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE', 'en', 'API Service'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARENT_API', 'it', 'Risorsa API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARENT_API', 'en', 'Parent API Resource'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_KEY', 'it', 'Chiave'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_KEY', 'en', 'Key'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTHORIZATION', 'it', 'Autorizzazione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTHORIZATION', 'en', 'Authority'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_FREE', 'it', 'Libera'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_FREE', 'en', 'Free'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_SIMPLE', 'it', 'Autenticazione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_SIMPLE', 'en', 'Simple Autentication'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_PERM', 'it', 'Autenticazione con permesso'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_PERM', 'en', 'Authentication with permission'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_GROUP', 'it', 'Autenticazione con gruppo'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_GROUP', 'en', 'Authentication with group'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_URI', 'it', 'Service URI'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_URI', 'en', 'Service URI'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMAS', 'it', 'XML Schema'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMAS', 'en', 'XML Schema'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMA_RESP', 'it', 'Risposta'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMA_RESP', 'en', 'Response'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS_SUMMARY', 'it', 'Summary..'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS_SUMMARY', 'en', 'Summary..'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS', 'it', 'Parametri'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS', 'en', 'Parameters'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_NAME', 'it', 'Nome'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_NAME', 'en', 'Name'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DESCRIPTION', 'it', 'Descrizione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DESCRIPTION', 'en', 'Description'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_REQUIRED', 'it', 'Obbligatorio'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_REQUIRED', 'en', 'Required'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DEFAULT_VALUE', 'it', 'Default'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DEFAULT_VALUE', 'en', 'Default'); ALTER TABLE contentsearch ALTER COLUMN datevalue TYPE timestamp without time zone; ALTER TABLE workcontentsearch ALTER COLUMN datevalue TYPE timestamp without time zone;
*Postgres Serv database
ALTER TABLE apicatalog_methods ALTER COLUMN authorizationrequired TYPE character varying(30); ALTER TABLE apicatalog_methods ADD CONSTRAINT apicatalog_methods_authorizationrequired_fkey FOREIGN KEY (authorizationrequired) REFERENCES authpermissions (permissionname); ALTER TABLE apicatalog_methods ADD COLUMN ishidden smallint; UPDATE apicatalog_methods SET ishidden = 0 WHERE ishidden IS NULL; ALTER TABLE apicatalog_methods ALTER ishidden SET NOT NULL; UPDATE apicatalog_methods SET isactive = 1 WHERE isactive IS NULL; ALTER TABLE apicatalog_methods ALTER isactive SET NOT NULL; ALTER TABLE apicatalog_services ADD COLUMN authenticationrequired smallint; ALTER TABLE apicatalog_services ADD COLUMN requiredpermission character varying(30); ALTER TABLE apicatalog_services ADD CONSTRAINT apicatalog_services_requiredpermission_fkey FOREIGN KEY (requiredpermission) REFERENCES authpermissions (permissionname); ALTER TABLE apicatalog_services ADD COLUMN requiredgroup character varying(20); ALTER TABLE apicatalog_services ADD CONSTRAINT apicatalog_services_requiredgroup_fkey FOREIGN KEY (requiredgroup) REFERENCES authgroups (groupname); ALTER TABLE apicatalog_services ADD COLUMN ishidden smallint; UPDATE apicatalog_services SET ishidden = 0 WHERE ispublic IS NULL; UPDATE apicatalog_services SET ishidden = 1 WHERE ispublic = 0; UPDATE apicatalog_services SET ishidden = 0 WHERE ispublic = 1; ALTER TABLE apicatalog_methods ALTER ishidden SET NOT NULL; ALTER TABLE apicatalog_services DROP COLUMN ispublic; ALTER TABLE api_oauth_consumers ALTER COLUMN expirationdate TYPE timestamp without time zone; ALTER TABLE api_oauth_tokens ALTER COLUMN accesstoken TYPE character varying(100); ALTER TABLE api_oauth_tokens ALTER COLUMN lastaccess TYPE timestamp without time zone; ALTER TABLE authusers ALTER COLUMN registrationdate TYPE timestamp without time zone; ALTER TABLE authusers ALTER COLUMN lastaccess TYPE timestamp without time zone; ALTER TABLE authusers ALTER COLUMN lastpasswordchange TYPE timestamp without time zone;
*MySQL Port database
UPDATE showletcatalog SET parameters = '<config> <parameter name="contentType">Content Type (mandatory)</parameter> <parameter name="modelId">Content Model</parameter> <parameter name="userFilters">Front-End user filter options</parameter> <parameter name="category">Content Category **deprecated**</parameter> <parameter name="categories">Content Category codes (comma separeted)</parameter> <parameter name="orClauseCategoryFilter" /> <parameter name="maxElemForItem">Contents for each page</parameter> <parameter name="maxElements">Number of contents</parameter> <parameter name="filters" /> <parameter name="title_{lang}">Showlet Title in lang {lang}</parameter> <parameter name="pageLink">The code of the Page to link</parameter> <parameter name="linkDescr_{lang}">Link description in lang {lang}</parameter> <action name="listViewerConfig"/> </config>' WHERE code = 'content_viewer_list'; INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_NO_SERVICES', 'it', 'Nessun Servizio API disponibile'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_NO_SERVICES', 'en', 'No API Service availables'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_GOTO_SERVICE_LIST', 'it', 'Lista Servizi API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_GOTO_SERVICE_LIST', 'en', 'API Service List'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICES', 'it', 'Servizi API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICES', 'en', 'API Services'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE', 'it', 'Servizio API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE', 'en', 'API Service'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARENT_API', 'it', 'Risorsa API'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARENT_API', 'en', 'Parent API Resource'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_KEY', 'it', 'Chiave'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_KEY', 'en', 'Key'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTHORIZATION', 'it', 'Autorizzazione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTHORIZATION', 'en', 'Authority'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_FREE', 'it', 'Libera'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_FREE', 'en', 'Free'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_SIMPLE', 'it', 'Autenticazione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_SIMPLE', 'en', 'Simple Autentication'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_PERM', 'it', 'Autenticazione con permesso'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_PERM', 'en', 'Authentication with permission'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_GROUP', 'it', 'Autenticazione con gruppo'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_AUTH_WITH_GROUP', 'en', 'Authentication with group'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_URI', 'it', 'Service URI'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_URI', 'en', 'Service URI'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMAS', 'it', 'XML Schema'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMAS', 'en', 'XML Schema'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMA_RESP', 'it', 'Risposta'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_SCHEMA_RESP', 'en', 'Response'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS_SUMMARY', 'it', 'Summary..'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS_SUMMARY', 'en', 'Summary..'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS', 'it', 'Parametri'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAMETERS', 'en', 'Parameters'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_NAME', 'it', 'Nome'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_NAME', 'en', 'Name'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DESCRIPTION', 'it', 'Descrizione'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DESCRIPTION', 'en', 'Description'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_REQUIRED', 'it', 'Obbligatorio'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_REQUIRED', 'en', 'Required'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DEFAULT_VALUE', 'it', 'Default'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ENTANDO_API_SERVICE_PARAM_DEFAULT_VALUE', 'en', 'Default'); ALTER TABLE contentsearch MODIFY COLUMN datevalue datetime; ALTER TABLE workcontentsearch MODIFY COLUMN datevalue datetime;
*MySQL Serv database
ALTER TABLE apicatalog_methods MODIFY COLUMN authorizationrequired varchar(30); ALTER TABLE apicatalog_methods ADD CONSTRAINT apicatalog_methods_authorizationrequired_fkey FOREIGN KEY (authorizationrequired) REFERENCES authpermissions (permissionname); ALTER TABLE apicatalog_methods ADD COLUMN ishidden smallint(6); UPDATE apicatalog_methods SET ishidden = 0 WHERE ishidden IS NULL; ALTER TABLE apicatalog_methods ALTER ishidden SET NOT NULL; UPDATE apicatalog_methods SET isactive = 1 WHERE isactive IS NULL; ALTER TABLE apicatalog_methods ALTER isactive SET NOT NULL; ALTER TABLE apicatalog_services ADD COLUMN authenticationrequired smallint(6); ALTER TABLE apicatalog_services ADD COLUMN requiredpermission varchar(30); ALTER TABLE apicatalog_services ADD CONSTRAINT apicatalog_services_requiredpermission_fkey FOREIGN KEY (requiredpermission) REFERENCES authpermissions (permissionname); ALTER TABLE apicatalog_services ADD COLUMN requiredgroup varchar(20); ALTER TABLE apicatalog_services ADD CONSTRAINT apicatalog_services_requiredgroup_fkey FOREIGN KEY (requiredgroup) REFERENCES authgroups (groupname); ALTER TABLE apicatalog_services ADD COLUMN ishidden smallint(6); UPDATE apicatalog_services SET ishidden = 0 WHERE ispublic IS NULL; UPDATE apicatalog_services SET ishidden = 1 WHERE ispublic = 0; UPDATE apicatalog_services SET ishidden = 0 WHERE ispublic = 1; ALTER TABLE apicatalog_methods ALTER ishidden SET NOT NULL; ALTER TABLE apicatalog_services DROP COLUMN ispublic; ALTER TABLE api_oauth_consumers MODIFY COLUMN expirationdate datetime; ALTER TABLE api_oauth_tokens MODIFY COLUMN accesstoken varchar(100); ALTER TABLE api_oauth_tokens MODIFY COLUMN lastaccess datetime; ALTER TABLE authusers MODIFY COLUMN registrationdate datetime; ALTER TABLE authusers MODIFY COLUMN lastaccess datetime; ALTER TABLE authusers MODIFY COLUMN lastpasswordchange datetime;
-
For every table belonging to plugins installed in oldPortal, change all the columns whose type is date to timestamp without time zone for PostgreSQL dbms; otherwise change date to datetime when MySQL is used.
-
Execute the following update scripts in the *Serv database if the plugin
Web Dynamic Form
is installed in oldPortal:ALTER TABLE jpwebdynamicform_messagesearch RENAME TO jpwebdynamicform_search; ALTER TABLE jpwebdynamicform_messageanswers RENAME TO jpwebdynamicform_answers;
At this pont the migration process is completed.