error in 20.04 sql upgrade script - userrights.sql
Posted: Tue Jun 23, 2020 9:10 pm
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
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