|
@@ 315-321 (lines=7) @@
|
| 312 |
|
* @param string $tablename |
| 313 |
|
* @param string $fieldname |
| 314 |
|
*/ |
| 315 |
|
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) { |
| 316 |
|
$table = new xmldb_table($tablename); |
| 317 |
|
$field = new xmldb_field($fieldname); |
| 318 |
|
if ($dbman->field_exists($table, $field)) { |
| 319 |
|
$dbman->drop_field($table, $field, true, true); |
| 320 |
|
} |
| 321 |
|
} |
| 322 |
|
|
| 323 |
|
/** |
| 324 |
|
* Generic helper function for renaming a field in a table. |
|
@@ 331-337 (lines=7) @@
|
| 328 |
|
* @param string $fieldnameold |
| 329 |
|
* @param string $fieldnamenew |
| 330 |
|
*/ |
| 331 |
|
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) { |
| 332 |
|
$table = new xmldb_table($tablename); |
| 333 |
|
$field = new xmldb_field($fieldnameold); |
| 334 |
|
if ($dbman->field_exists($table, $field)) { |
| 335 |
|
$dbman->rename_field($table, $field, $fieldnamenew, true, true); |
| 336 |
|
} |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
/** |
| 340 |
|
* Generic helper function for renaming a table. |