|
@@ 267-273 (lines=7) @@
|
| 264 |
|
* @param string $tablename |
| 265 |
|
* @param string $fieldname |
| 266 |
|
*/ |
| 267 |
|
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) { |
| 268 |
|
$table = new xmldb_table($tablename); |
| 269 |
|
$field = new xmldb_field($fieldname); |
| 270 |
|
if ($dbman->field_exists($table, $field)) { |
| 271 |
|
$dbman->drop_field($table, $field, true, true); |
| 272 |
|
} |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
/** |
| 276 |
|
* Generic helper function for renaming a field in a table. |
|
@@ 283-289 (lines=7) @@
|
| 280 |
|
* @param string $fieldnameold |
| 281 |
|
* @param string $fieldnamenew |
| 282 |
|
*/ |
| 283 |
|
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) { |
| 284 |
|
$table = new xmldb_table($tablename); |
| 285 |
|
$field = new xmldb_field($fieldnameold); |
| 286 |
|
if ($dbman->field_exists($table, $field)) { |
| 287 |
|
$dbman->rename_field($table, $field, $fieldnamenew, true, true); |
| 288 |
|
} |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
/** |
| 292 |
|
* Generic helper function for renaming a table. |