|
@@ 203-210 (lines=8) @@
|
| 200 |
|
* @param string $tablename |
| 201 |
|
* @param string $fieldname |
| 202 |
|
*/ |
| 203 |
|
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) { |
| 204 |
|
$table = new xmldb_table($tablename); |
| 205 |
|
$field = new xmldb_field($fieldname); |
| 206 |
|
if ($dbman->field_exists($table, $field)) { |
| 207 |
|
$dbman->drop_field($table, $field, true, true); |
| 208 |
|
} |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
/** |
| 212 |
|
* Generic helper function for renaming a field in a table. |
| 213 |
|
* |
|
@@ 219-226 (lines=8) @@
|
| 216 |
|
* @param string $fieldnameold |
| 217 |
|
* @param string $fieldnamenew |
| 218 |
|
*/ |
| 219 |
|
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) { |
| 220 |
|
$table = new xmldb_table($tablename); |
| 221 |
|
$field = new xmldb_field($fieldnameold); |
| 222 |
|
if ($dbman->field_exists($table, $field)) { |
| 223 |
|
$dbman->rename_field($table, $field, $fieldnamenew, true, true); |
| 224 |
|
} |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
/** |
| 228 |
|
* Generic helper function for renaming a table. |
| 229 |
|
* |