fix(river): add enabled col to river table, update on enable/disable of ...

...referenced entities

Fixes #6022 - empty river items fetched when referenced entities are disabled

TODO:
- [x] Make events private API
- [x] Fix Comments for Travis
- [x] Manual Testing
- [x] Automated Tests
- [x] Add the column to the install schema
- [x] Add documentation for property to model class
- [x] Export property value in toObject
- [x] Address @mrclay docblock comments
Good case for switching to dbal. Then we wouldn't have to remember to add
dbprefix ever.

On Thu, Jul 10, 2014, 9:38 AM Matt Beckett <notifications@github.com> wrote:

> In
> engine/lib/upgrades/2014070600-1.9.0_rc.3-river_enabled_col-bef9e6f0533ac338.php:
>
> > +/**
> > + * Elgg 1.9.0-rc.3 upgrade 2014070600
> > + * river_enabled_col
> > + *
> > + * Add an 'enabled' column to the river table
> > + */
> > +
> > +$dbprefix = elgg_get_config('dbprefix');
> > +
> > +$q1 = "ALTER TABLE  {$dbprefix}river ADD  enabled ENUM(  'yes',  'no' ) NOT NULL DEFAULT  'yes';";
> > +update_data($q1);
> > +
> > +// update any river entries that need to be disabled
> > +$q2 = <<<Q2
> > +	UPDATE {$dbprefix}river AS rv
> > +	LEFT JOIN elgg_entities AS se ON se.guid = rv.subject_guid
>
> ugh, code fail AND code review fail... I don't know how many opportunities
> I had to notice this
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Elgg/Elgg/pull/7013/files#r14777124>.
>