Hey Kosta,
The values in my extension are not user specific. It is really just a
handful of values for the entire wiki.
One approach I'm considering is to abuse the page props table and have the
values "linked to page" with ID 1 billion (or -1) or so. I'm not sure how
safe that is though. The data would only be stored in the database, so not
losing it due to the running of some maintenance process is important.
Cheers
--
Jeroen De Dauw |
www.EntropyWins.wtf <https://EntropyWins.wtf>
Professional wiki hosting and services:
www.Professional.Wiki
<https://Professional.Wiki>
Software Crafter | Speaker | Entrepreneur | Open Source and Wikimedia
contributor ~=[,,_,,]:3
On Mon, 27 Jan 2020 at 12:30, Kosta Harlan <kharlan(a)wikimedia.org> wrote:
Hi,
On 1/27/20 12:13 PM, Jeroen De Dauw wrote:
Hey,
I have a MediaWiki extension in which I'd like to store a handful of
values. Example:
* Cats 42
* Ravens 23
* Goats 0
The most obvious thing to do would be to add a new database table with a
string and an integer column. However I'd like to avoid the need to run
update.php to install this extension. Is there some place in the
MediaWiki
DB schema where I can put a few values like
these? They could even be in
a
single serialized blob (though preferably can be
looked up by string
key).
You want to store these values per-user, I'm assuming? This is probably
of interest then:
https://phabricator.wikimedia.org/T128602
In GrowthExperiments extension we store small bits of data like that as
serialized blobs in hidden user preferences, but this isn't great, among
other reasons because the values are delivered on on each page load
whether you want them or not.
Kosta
Cheers
--
Jeroen De Dauw |
www.EntropyWins.wtf <https://EntropyWins.wtf>
Professional wiki hosting and services:
www.Professional.Wiki
<https://Professional.Wiki>
Software Crafter | Speaker | Entrepreneur | Open Source and Wikimedia
contributor ~=[,,_,,]:3
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l