Changeset 15129
- Timestamp:
- 01/31/09 19:50:51 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelSqlDiffPlugin/branches/1.2/lib/dbInfo.php
r14441 r15129 150 150 $mycode = $data['code']; 151 151 $otherfkname = $this->get_fk_name_by_field($tablename, $data['field']); 152 $otherdata = @$this->tables[$tablename]['fkeys'][$otherfkname]; 153 if($data['ref_table']!=$otherdata['ref_table'] 154 or $data['ref_field']!=$otherdata['ref_field'] 155 or $data['on_delete']!=$otherdata['on_delete'] 156 or $data['on_update']!=$otherdata['on_update'] ) { 152 $othercode = @$this->tables[$tablename]['fkeys'][$otherfkname]['code']; 153 if($mycode && !$othercode) { 157 154 $diff_sql .= "ALTER TABLE `$tablename` ADD {$mycode};\n"; 158 155 };