projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cfa804b
)
UpdateDatabase/MysqlLinks.php
author
Alan Knowles
<alan@roojs.com>
Thu, 16 Apr 2015 07:30:47 +0000
(15:30 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 16 Apr 2015 07:30:47 +0000
(15:30 +0800)
UpdateDatabase/MysqlLinks.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase/MysqlLinks.php
b/UpdateDatabase/MysqlLinks.php
index
748bd34
..
98a0f20
100644
(file)
--- a/
UpdateDatabase/MysqlLinks.php
+++ b/
UpdateDatabase/MysqlLinks.php
@@
-258,6
+258,13
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
$source_tbl = $tbl;
list($target_table , $target_col) = explode(':', $target);
$source_tbl = $tbl;
list($target_table , $target_col) = explode(':', $target);
+
+ if (!isset($this->schema[$target_table])) {
+ // skip... target table does not exist
+ continue;
+ }
+
+
$err = substr("Fail: INSERT referenced {$tbl}:{$source_col}", 0, 64);
$trigger .="
SET mid = 0;
$err = substr("Fail: INSERT referenced {$tbl}:{$source_col}", 0, 64);
$trigger .="
SET mid = 0;
@@
-332,6
+339,11
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
$source_tbl = $tbl;
list($target_table , $target_col) = explode(':', $target);
$source_tbl = $tbl;
list($target_table , $target_col) = explode(':', $target);
+ if (!isset($this->schema[$target_table])) {
+ // skip... target table does not exist
+ continue;
+ }
+
$err = substr("Fail: UPDATE referenced {$tbl}:$source_col", 0, 64);
$trigger .="
SET mid = 0;
$err = substr("Fail: UPDATE referenced {$tbl}:$source_col", 0, 64);
$trigger .="
SET mid = 0;