Page 1 of 1

error in 20.04 sql upgrade script - userrights.sql

Posted: Tue Jun 23, 2020 9:10 pm
by JuergenB
Hi, i need some help in upgrading from 19.10 to 20.04

I have a clean installation with a fresh database. I dropped the old database and create a new one for testing.
I have these modules installed.

runtime 19.10.009.016
frontend 19.10.000.170
backend 19.10.000.128

and if i upgrade these modules i get an error, after the fruntend updates the database and before the backend will be updated.

runtime 20.04.000.043
frontend 20.04.000.143

This is the error message, this happens during the userrights.sql

...
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.01.315-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.01.460-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
ERROR 1452 (23000) at line 18: Cannot add or update a child row: a foreign key constraint fails (`openemm`.`admin_group_permission_tbl`, CONSTRAINT `admgrp$perm$fk` FOREIGN KEY (`security_token`) REFERENCES `permission_tbl` (`permission_name`))
DB update finished

I use this mysqld settings in /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
lower_case_table_names=1
wait_timeout=604800
sql-mode="STRICT_ALL_TABLES,NO_ENGINE_SUBSTITUTION"

Is there anything i missed for the upgrade?

Thanks

Jürgen

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Wed Jun 24, 2020 12:00 pm
by aso
Line 18 means the permission "campaign.autoopt".
Maybe this permission entry vanished somehow in your database.

Please try this statement and re-execute the userrights.sql.
INSERT INTO permission_tbl (permission_name, category, sub_category, sort_order, feature_package) VALUES ('campaign.autoopt', 'Campaigns', NULL, 1, NULL);

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Wed Jun 24, 2020 3:04 pm
by JuergenB
Thanks,

this is a clean fresh installed OpenEMM database from installer 19.10.

I verified the 19.10 sql script, there is no 'campaign.autoopt' in this script.

Do i need to insert this into openemm or emm database?
Can we get a fixed installer?

Thanks

Jürgen

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Wed Jun 24, 2020 3:22 pm
by aso
Didn't you write you tried to install "frontend 20.04.000.143" in your first post?
Does the error happen in version 20.04 or 19.10?
In 19.10 this permission did not exist.
It is new in 20.04.

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Wed Jun 24, 2020 4:25 pm
by JuergenB
I have a clean, fresh install with 19.10 (and although a production 19.10 i wish to upgrade).

So, i have a clean fresh 19.10 running.
I do a Install or update package from AGNITAS Website

Here i get all the latest modules and frontend, backend, gui, ... upgrade.
The installer downloads these modules and after the frontend is downloaded.

The script is upgrading the 19.10 to 20.04 (database structure and content)...

And here the script fails.

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Thu Jun 25, 2020 8:35 am
by aso
Please try our new released Version 20.04.000.155.
It is available via the standard update process and should fix this problem.

Re: error in 20.04 sql upgrade script - userrights.sql

Posted: Thu Jun 25, 2020 7:15 pm
by JuergenB
Thanks aso,

the new release works fine, i had no problems during an upgrade from 19.10 to 20.04 with the new runtime.

Thanks!
:D :D

Now, i`ll try to upgrade CentOS 7 to 8 or move mariadb and all config to a new VM ... 8)
Didn´t worked well, got some problems after upgrade.

Much easier to install 20.04 with the same setting under CentOS 8.
Dump and Restore mariadb ...
Done :)