Skip to content

bayanat v1.8

Compare
Choose a tag to compare
@sjacgit sjacgit released this 23 Sep 19:06
· 25 commits to main since this release
  • Upgrade to Flask 2.0.
  • Upgrade to Flask Security Too 4.0.
    • Update all system components to use username instead of email field.
    • Several changes to user management to accommodate changes in this new version.
  • Upgrade multiple other requirements to major new versions.
  • Geolocation feature:
    • Geo Marker component: allowing user to store geolocation info about important objects in videos.
    • Global map in Bulletin to visualize Geo markers as well as locations in the Bulletin and events.
  • Refactoring location children search
  • Search for children locations in Actors and Incidents.
  • Accurate date search in all date fields.
  • Add search box in Locations dashboard.
  • Add assigned user and peer reviewer to preview cards.
  • Add a setting to disable deduplication dashboard.
  • Command to export Bulletins in JSON format.
  • Refactoring event type display, fixing a bug that prevented event types for Actors from appearing in the list.
  • Fix for a bug in media thumbnail rendering order.
  • Fix for a bug that prevented adding related items to Incidents.
  • Fix for a bug that affected video player dialog in rare circumstances.
  • Fix for a bug in coordinates fields in Locations form.

This is a major release that brings new geolocation features to the Bulletin section of Bayanat, allowing the user to store, catalog and visualize coordinates for objects in videos. This new release also contains major changes to accommodate changes in the new Flask framework 2.0 version, Flask Security Too 4.0 version, as well as other requirements. It's important to upgrade to this version as soon as possible.

Ensure a backup of the database is taken before attempting to upgrade. Users should also clear their browsers' caches after any update.

To upgrade to this version, PostGIS needs to be installed:

sudo apt install postgis

The Postgres server should be restarted after installing this package.

After that, all requirements needs to be upgraded to the new versions. You should run in the directory of the Bayanat installation::

virtualenv env -p python3
source env/bin/activate
pip install -r requirements.txt

flask create-db can now be run to create the new geo markers component.

Then, there are a few migration steps in the Postgres database terminal for Flask Security Too upgrade. First, we need to create the new fs_uniquifier field and populate it:

alter table "user" add column fs_uniquifier varchar not null default md5(random()::text);

Secondly, as we switched the main identity to usersnames (instead of the email column), we need to generate usersnames. Our solution is to simply copy existing content of the email column:

update "user" set username = email;

Then, optionally, emails can be removed. This is especially a good idea if non-emails were used in that field as it might cause problems in UI email validation. This can be done with the following command:

update "user" set email = null;

Finally, we need to drop the non-null constraint for the email column:

alter table "user" alter column email drop not null;