| @@ 1454-1457 (lines=4) @@ | ||
| 1451 | $sql .= $cons->fields['consrc']; |
|
| 1452 | } else { |
|
| 1453 | switch ($cons->fields['contype']) { |
|
| 1454 | case 'p': |
|
| 1455 | $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); |
|
| 1456 | $sql .= 'PRIMARY KEY (' . join(',', $keys) . ')'; |
|
| 1457 | break; |
|
| 1458 | case 'u': |
|
| 1459 | $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); |
|
| 1460 | $sql .= 'UNIQUE (' . join(',', $keys) . ')'; |
|
| @@ 1458-1461 (lines=4) @@ | ||
| 1455 | $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); |
|
| 1456 | $sql .= 'PRIMARY KEY (' . join(',', $keys) . ')'; |
|
| 1457 | break; |
|
| 1458 | case 'u': |
|
| 1459 | $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); |
|
| 1460 | $sql .= 'UNIQUE (' . join(',', $keys) . ')'; |
|
| 1461 | break; |
|
| 1462 | default: |
|
| 1463 | // Unrecognised constraint |
|
| 1464 | $this->rollbackTransaction(); |
|