Closed alessioluciano closed 4 years ago
@alessioluciano
Thanks for reporting this issue. ORM definition with 'unique = true'. we will fix this issue soon.
For now you can remove this 'unique = true' from user entity and update database by below command: php bin/console d:s:u --force
People, I found an error when i try to update a user profile. The error shows that SQL engine don't allow me to execute an update because an unique constraint at timezone and timeformat. We drop that index at 'uv_user' table and allow me to update the user. Finally searching at User Entity we found the ORM definition with 'unique = true'.
MariaDB [uvdesk]> show index from uv_user; +---------+------------+-----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +---------+------------+-----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | uv_user | 0 | PRIMARY | 1 | id | A | 25 | NULL | NULL | | BTREE | | | | uv_user | 0 | UNIQ_E8D39F61E7927C74 | 1 | email | A | 25 | NULL | NULL | YES | BTREE | | | | uv_user | 0 | UNIQ_E8D39F61DB26A4E | 1 | proxy_id | A | 2 | NULL | NULL | YES | BTREE | | | | uv_user | 0 | UNIQ_E8D39F61E821C39F | 1 | verification_code | A | 25 | NULL | NULL | YES | BTREE | | | | uv_user | 0 | UNIQ_E8D39F613701B297 | 1 | timezone | A | 4 | NULL | NULL | YES | BTREE | | | | uv_user | 0 | UNIQ_E8D39F6111F07F3F | 1 | timeformat | A | 4 | NULL | NULL | YES | BTREE | | | +---------+------------+-----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 6 rows in set (0.00 sec)
drop index UNIQ_E8D39F6111F07F3F on uv_user; drop index UNIQ_E8D39F613701B297 on uv_user;
/vendor/uvdesk/core-framework/Entity/User.php