Nix-Security-WG / nix-security-tracker

Web service for managing information on vulnerabilities in software distributed through Nixpkgs
31 stars 7 forks source link

feat: nixpkgsissue activity log view #126

Open alejandrosame opened 10 months ago

alejandrosame commented 10 months ago

feat: nixpkgsissue activity log view

Improve the messy representation of the different pghistory event tables:

If performance starts being problematic for the log_nixpkgsissue view, we can make it a materialized view and add a trigger to update its contents on shared.nixpkgsissue and it's m2m relationships updates.

NOTE: This PR includes #101

alejandrosame commented 10 months ago

@RaitoBezarius the cascade does nothing because it prevents Django from trying to delete content from a postgres VIEW, which would just yield an error (it's read-only after all).

The data is collected from other auth and pghistory tables so we have to double check there what exactly we want to do on user deletion. There's also the default Django admin table, which registers less finegrained changes made by users.

I'll make an issue to not to forget about looking into this.

alejandrosame commented 10 months ago

Please don't merge yet. Working on some other functionality I noticed a mistake on the way I set the migration file in this PR.

I'll take this out of draft as soon as I push the fix.

alejandrosame commented 10 months ago

The PR is in a mergeable state again.

alejandrosame commented 10 months ago

rebased with latest changes

alejandrosame commented 10 months ago

@RaitoBezarius if you can reconfirm that you are ok with this approach after the rebases, this is ready to be merged.

fricklerhandwerk commented 1 month ago

Towards https://github.com/Nix-Security-WG/nix-security-tracker/issues/169