Skip to content

bayanat v1.3

Compare
Choose a tag to compare
@sjacgit sjacgit released this 19 Apr 14:18
· 35 commits to main since this release
  • Improvements to data import tool:
    • Server-side import with sub-folder scanning
    • Adding verified labels
    • Improved logging
    • Added import to activity monitor
    • Added batch ID
    • File hash check for duplicates
    • Fix for data persistence issue in UI
    • Support for more extensions
  • Added missing place of origin to Actor edit form
  • Added location type to location edit form
  • PDF viewer now opens PDFs in a popup (same page)
  • Indexed source link for search
  • Added permission for bulk update to moderators

You should take a backup before updating.

To update from a previous version, you'll need to run the following in PostgreSQL terminal:

alter table bulletin add column search text generated always as ( id::text || ' ' ||
COALESCE(title, '') || ' ' || COALESCE(title_ar,'') || ' ' || COALESCE(description,'')  || ' ' || COALESCE(originid,'') || 
' ' || COALESCE(sjac_title,'')    || ' ' || COALESCE(sjac_title_ar,'')  || ' ' || COALESCE(description,'')   || ' ' || COALESCE(comments,'')  
) stored;
create index ix_bulletin_search on bulletin  using GIN (search gin_trgm_ops);
alter table actor add column search text generated always as ( id::text || ' ' ||
COALESCE(name, '') || ' ' || COALESCE(name_ar,'') || ' ' || COALESCE(originid,'') || ' ' || COALESCE(description,'')   || ' ' || COALESCE(comments,'')  
) stored;
create index ix_actor_search on actor  using GIN (search gin_trgm_ops);
alter table incident add column search text generated always as ( id::text || ' ' ||
COALESCE(title, '') || ' ' || COALESCE(title_ar,'') || ' ' || COALESCE(description,'')  || ' ' || COALESCE(comments,'')  
) stored;
create index ix_incident_search on incident  using GIN (search gin_trgm_ops);
drop index ix_bulletin_description;
drop index ix_bulletin_title;
drop index ix_bulletin_tsv;
drop index actor_fulltext;
drop index ix_actor_tsv;
drop index ix_incident_tsv;
create index ix_bulletin_history_bulletin_id on bulletin_history(bulletin_id);
create index ix_actor_history_actor_id on actor_history(actor_id);
create index ix_incident_history_incident_id on incident_history(incident_id);
update bulletin set tsv = null;
update actor set tsv = null;
update incident set tsv = null;

This is to migrate full text search to use postgres computed columns, cleaning up previous indexes and tsvector columns (no longer used).

Celery systemd service also needs to be updated for the use of data import tool. You can check the installation guide.