CentOS 7, mysql.
For some reason, it looks like the policyconditions
table can’t be created, and the db migration exits silently. However, all the files are pulled correctly, but accessing the webgui shows a json output.
Error code:
{"message": "(_mysql_exceptions.ProgrammingError) (1146, \"Table 'privacyidea.policycondition' doesn't exist\")\n[SQL: SELECT policy.id AS policy_id, policy.active AS policy_active, policy.check_all_resolvers AS policy_check_all_resolvers, policy.name AS policy_name, policy.scope AS policy_scope, policy.action AS policy_action, policy.realm AS policy_realm, policy.adminrealm AS policy_adminrealm, policy.resolver AS policy_resolver, policy.user AS policy_user, policy.client AS policy_client, policy.time AS policy_time, policy.priority AS policy_priority, policycondition_1.id AS policycondition_1_id, policycondition_1.policy_id AS policycondition_1_policy_id, policycondition_1.section AS policycondition_1_section, policycondition_1.`Key` AS `policycondition_1_Key`, policycondition_1.comparator AS policycondition_1_comparator, policycondition_1.`Value` AS `policycondition_1_Value`, policycondition_1.active AS policycondition_1_active \nFROM policy LEFT OUTER JOIN policycondition AS policycondition_1 ON policy.id = policycondition_1.policy_id ORDER BY policycondition_1.id]\n(Background on this error at: http://sqlalche.me/e/f405)", "code": -500}
mysql db errors:
------------------------
LATEST FOREIGN KEY ERROR
------------------------
200218 15:31:08 Error in foreign key constraint of table `privacyidea`.`policycondition`:
Create table `privacyidea`.`policycondition` with foreign key constraint failed. Referenced table `privacyidea`.`policy` not found in the data dictionary near 'FOREIGN KEY(policy_id) REFERENCES policy (id),
CHECK (active IN (0, 1))
)ROW_FORMAT=DYNAMIC'.
--------
“pi-manage db show -d …”
Rev: 0c7123345224 (head)
Parent: d756b34061ff
Path: /opt/privacyIDEA/lib/privacyidea/migrations/versions/0c7123345224_.py
Store privacyIDEA node in clientapplication table
Revision ID: 0c7123345224
Revises: d756b34061ff
Create Date: 2019-09-06 13:27:12.020779
Any thoughts on why this might fail?