|
@@ 233-239 (lines=7) @@
|
| 230 |
|
* @param string $tablename |
| 231 |
|
* @param string $fieldname |
| 232 |
|
*/ |
| 233 |
|
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) { |
| 234 |
|
$table = new xmldb_table($tablename); |
| 235 |
|
$field = new xmldb_field($fieldname); |
| 236 |
|
if ($dbman->field_exists($table, $field)) { |
| 237 |
|
$dbman->drop_field($table, $field, true, true); |
| 238 |
|
} |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
/** |
| 242 |
|
* Generic helper function for renaming a field in a table. |
|
@@ 249-255 (lines=7) @@
|
| 246 |
|
* @param string $fieldnameold |
| 247 |
|
* @param string $fieldnamenew |
| 248 |
|
*/ |
| 249 |
|
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) { |
| 250 |
|
$table = new xmldb_table($tablename); |
| 251 |
|
$field = new xmldb_field($fieldnameold); |
| 252 |
|
if ($dbman->field_exists($table, $field)) { |
| 253 |
|
$dbman->rename_field($table, $field, $fieldnamenew, true, true); |
| 254 |
|
} |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
/** |
| 258 |
|
* Generic helper function for renaming a table. |