Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[SQL] Error running SQL/9999-99-99-drop_tables.sql due to `physiological_file`

Open zaliqarosli opened this issue 1 year ago • 1 comments

Describe the bug

lorisadmin@copn-dev:/var/www/loris$ mysql < SQL/9999-99-99-drop_tables.sql
ERROR 1451 (23000) at line 27: Cannot delete or update a parent row: a foreign key constraint fails

line 27:

DROP TABLE IF EXISTS `physiological_file`;

~I think the issue is because the physiological_file references itself with the ParentID column~ edit: not sure what is causing this foreign key constraint fail

To Reproduce Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What did you expect to happen? A clear and concise description of what you expected to happen.

Browser Environment (please complete the following information):

  • OS: [e.g. Plan9, HURD, Oberon, etc]
  • Browser [e.g. chrome, firefox] (note that only these two browsers are supported)
  • Version [e.g. 22]

Server Environment (if known): Note: We only support the most recent release of LORIS.

  • LORIS Version: [e.g. 22.0.0]
  • Linux distribution and Version: [e.g. Ubuntu 16.04, CentOS 7]
  • MySQL/MariaDB Version: [e.g. MySQL 5.7, MariaDB 10.3]

Additional context Add any other context about the problem here.

zaliqarosli avatar Jun 21 '23 19:06 zaliqarosli