Page MenuHomePhabricator

Avoid polymorphic database columns in the JADE schema
Closed, ResolvedPublic

Description

There was unanimous support in discussion of T200297 for avoiding any database polymorphism, and we'll take that principle further to eliminate all generic parameters to public APIs.

This task is done when:

  • Implement secondary tables. Each entity type will have its own table and indexes. Hooks keep the data in sync.
  • Split get and post APIs out by judgment schema, e.g. "judge diff damaging".

Other moments of the conversation also suggest that we should lose the generic subpage syntax where possible, but that doesn't need to be solved in this task. I've also extended this reasoning to the API, and am happy with the results so far.

It will still be beneficial to generalize backend logic such as the ContentHandler that they share, though it may be subclassed to implement each judgment schema as a slight variation with its own unique validation, rendering, and so on.

Related Objects

Event Timeline

awight created this task.Aug 28 2018, 11:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 28 2018, 11:01 PM

Change 456044 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/JADE@master] [WIP] Replace generic APIs with specific ones

https://gerrit.wikimedia.org/r/456044

awight updated the task description. (Show Details)Aug 29 2018, 6:23 AM

Change 456048 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/JADE@master] [WIP] APIs for specific schemas

https://gerrit.wikimedia.org/r/456048

Change 456078 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/JADE@master] [WIP] rough secondary tables

https://gerrit.wikimedia.org/r/456078

Change 456048 abandoned by Awight:
[WIP] APIs for specific schemas

Reason:
squashed

https://gerrit.wikimedia.org/r/456048

Harej moved this task from Inbox to Feature Requests on the Jade board.Sep 7 2018, 11:03 PM
awight renamed this task from Distinct APIs and tables for each judgment target type, drop polymorphism and generic interfaces or schemas to Avoid polymorphic database columns in the JADE schema.Sep 27 2018, 5:34 AM
Harej moved this task from Feature Requests to Review on the Jade board.Oct 13 2018, 9:18 AM
awight closed this task as Resolved.

Change 456044 abandoned by Ladsgroup:
[WIP] Replace generic APIs with specific ones

Reason:
This has merge conflict and requires so much work to bring to a state that can be useful. Also, this extension is being archived in favor its clone "Jade"

https://gerrit.wikimedia.org/r/456044