mysql - Propel cannot delete due to Integrity constraint violation -
I'm running in progress of 1.6.9 and the previous developer has recently updated the files because I have Also, some problems arise, trying to delete everything on my laptop files went well except for a problem
Fatal error:. 'SQLSTATE [23,000]' with no exception 'PDOException' message: Integrity barrier violation: Can not delete or update a parent 1451 Line: A foreign key fails in constraint (`db000_app / file_meta`, interrupted) File_meta_FK_1` Enter the foreign key (`case_id`) reference` agency_costs` (`id`)) '/ var / www / vhosts/10/ +14,462/webspace/httpdocs/moder/vendor/products/prolel1/ Order / lib / connection / debugPDOStatement.php: 90 stack trace: # 0 / var / www / vhosts / 10 / +154462 / webspace / httpdocs / domain / vendor / inspir Of / propel1 / order /lib/connection/DebugPDOStatement.php(90): PDOStatement- & gt; (Void) # 1 / var / www / vhosts / 10 / 1,54,462 / webspace / httpdocs / domain / vendor / induced / propel1 / order / lib / util /baseepeer.php (145): DebugPDOStatement- & Gt; Execute () # 2 / var / www / vhosts / 10 / +154,462 / webspace / httpdocs / domain / vendor / induced / propel1 / build / classes / onterechtbetaald / ohm / baseAgencyCostsPeer. Php (1085): BasePier :: Delilate (Object (agency to stsQuery), Object (DebugPDO)) # 3 [Internal Function]: On / var / www / vhosts / 10/154462 / webspace / httpdocs / domain / vendor / propel BaseAgencyCo line 149 in /propel1/runtime/lib/util/BasePeer.php The code that calls the deleted function:
$ case = AgencyCostsQuery :: create () - & gt; FindPk ($ _ POST ["DeleteId"]); If ($ case! == zero) {$ case-> deleteFiles (); $ Case & gt; remove (); } As it was said that earlier files were upgraded, it works fine. The database has been changed: Two columns have been added to the agency call.
Any ideas on how to remove this error?
The problem was due to the definition of the constraint of the database. Set to block the obstruction and prevent it from updating. To solve this problem the waterfall solves my problem
Comments
Post a Comment