10 Commits

Author SHA1 Message Date
3f8671f2c2 Ensure all entities have "table" in entities.mjs
We had these for some seemingly at random (I assume because
we happened to be using them somewhere).
I needed a bunch more for my next feature, but I thought I would
add all of themnow  to avoid having to add more batches in the future.
2025-01-10 17:38:31 +01:00
9288542459 CAA-84: Event Art Archive 2024-05-22 13:58:52 -05:00
162d130821 MBS-13421: Add support for genre collections () 2024-05-06 20:45:17 -05:00
82c79f531e MBS-13449: Reimplement transactional cache without database locks
This is intended to help resolve deadlocks (MBS-11345, MBS-12314) and
performance issues due to lock contention.

It supplants https://github.com/metabrainz/musicbrainz-server/pull/212.

The new implementation is documented in `Data::Role::EntityCache`.
2024-02-06 21:51:57 -06:00
3b70d775b8 Replace $MakeReadOnly type with one using infer
https://flow.org/en/docs/types/conditional/

I took the new implementation from https://github.com/facebook/flow/commit/5914a18
2023-10-20 15:07:25 -05:00
45a4efc828 Remove wrong claim that label is manually removable
We dropped the label manual removal option with MBS-12279
but I forgot to amend entities.mjs.
2023-05-29 11:37:25 +03:00
499fad5351 MBS-10499: Alert for entity in danger of removal once add edit passes
Sometimes users (especially new ones) add an entity as a votable edit
(by checking the relevant checkbox) and are then not notified
that the entity is in risk of removal, since their add edit
means there's a pending edit keeping the entity around.
Unless they have added more data, though, the entity will be removed
soon after the one pending edit passes.

This checks if the creation edit is the only thing keeping the entity
from being otherwise eligible for cleanup. If that's the case,
it then notifies the user with the same banner anyway.

I'm also adding a test to see if the banners show as expected
for artist at least, since AFAICT we were not testing this at all.

Notice that is_empty no longer checks edits directly.
The RemoveEmpty autoremoval script actively checks
for edits anyway, so there should be no risk this change would
cause the wrong things to be removed.
2023-05-17 16:14:06 +03:00
0a7a223297 Standardize 1 to true
We use true for all other entities.
2023-01-30 16:08:54 +02:00
98e5030f4c Avoid warning about uninitialized relatable
We were doing an eq check on relatable, but track
did not have relatable listed at all in entities.mjs.
Since we do relatable: false for other non-relatable entities,
it seems sensible to also add it to track.
2022-11-11 15:50:58 +02:00
92d809eaaf Add entities.mjs & generate entities.json from it
Importing entities.json into a JS file using Flow produces an any-typed
value.  Defining a Flow type for this JSON and keeping it up-to-date is
much harder than just defining the ENTITIES structure in JS and letting
Flow create a literal object type for it.  We can then generate
entities.json (which is still used by the Perl) from this file using an
added script.
2022-08-11 18:40:37 -05:00