Commit ac9c08a0 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use xmldb in upgrade

Signed-off-by: default avatarRichard Mansfield <>
parent 6d5c8534
......@@ -1610,8 +1610,15 @@ function xmldb_core_upgrade($oldversion=0) {
if ($oldversion < 2010042600) {
execute_sql('ALTER TABLE {notification_internal_activity} ADD COLUMN parent BIGINT');
execute_sql('ALTER TABLE {notification_internal_activity} ADD CONSTRAINT {notiinteacti_par_fk} FOREIGN KEY (parent) REFERENCES {notification_internal_activity}(id)');
// @todo: Move to notification/internal
$table = new XMLDBTable('notification_internal_activity');
$field = new XMLDBField('parent');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10');
add_field($table, $field);
$key = new XMLDBKey('parentfk');
$key->setAttributes(XMLDB_KEY_FOREIGN, array('parent'), 'notification_internal_activity', array('id'));
add_key($table, $key);
return $status;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment