diff options
author | Marc Delisle <marc@infomarc.info> | 2008-05-04 22:36:17 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2008-05-04 22:36:17 +0400 |
commit | 7c5d5c466af084ef2d4fdeb9cc99ce5a6503ea51 (patch) | |
tree | bbbff6e89f8c3541627739d98b0f8a06e9672ba3 /pmd_relation_upd.php | |
parent | f0cd8feebec711d9eb813bbf49a5e2644c60aa2f (diff) |
PBXT: foreign key support
Diffstat (limited to 'pmd_relation_upd.php')
-rw-r--r-- | pmd_relation_upd.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index 2c3f38d076..ed74dde41d 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -23,14 +23,14 @@ $type_T1 = strtoupper($tables[$T1]['ENGINE']); $tables = PMA_DBI_get_tables_full($db, $T2); $type_T2 = strtoupper($tables[$T2]['ENGINE']); -if ($type_T1 == 'INNODB' && $type_T2 == 'INNODB') { +if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && $type_T1 == $type_T2) { // InnoDB - $existrel_innodb = PMA_getForeigners($DB2, $T2, '', 'innodb'); + $existrel_foreign = PMA_getForeigners($DB2, $T2, '', 'foreign'); - if (isset($existrel_innodb[$F2]['constraint'])) { + if (isset($existrel_foreign[$F2]['constraint'])) { $upd_query = 'ALTER TABLE ' . PMA_backquote($T2) . ' DROP FOREIGN KEY ' - . PMA_backquote($existrel_innodb[$F2]['constraint']); + . PMA_backquote($existrel_foreign[$F2]['constraint']); $upd_rs = PMA_DBI_query($upd_query); } } else { |