Sounds like you just want a simple key value store that.
I don't believe mediawiki has a table or interface for this.

Slightly relevant would be https://phabricator.wikimedia.org/T227776 although
that RFC will likely come up with something that is in some way bound to a
page.

On Tue, 28 Jan 2020 at 19:14, Jaime Crespo <[email protected]> wrote:

> > It complicates extension installation
>
> One could just copy and paste the existing migration code and just change
> the SQL to the right CREATE TABLE, and be done. If you just have to create
> a table, you will only have to do that once, no maintenance required.
> Trying to fit values into existing tables, however will create a lot of
> maintenance headaches, as Brian said.
>
> # include/Hooks.php
> $base = __DIR__ . "/../sql";
> $updater->addExtensionTable( 'extension_value', $base .
> '/ExtensionValue.sql' );
> # sql/ExtensionValue.sql
> CREATE TABLE extension_value (
> k varchar(100) PRIMARY KEY,
> v int NOT NULL,
> );
>
> If you are overwhelmed with SQL or mediawiki migration system please just
> ask for help and people here, including me, will be able to help! :-D
> Mediawiki core code can be intimidating because support of several
> databases systems and its long history of schema changes, but in your case
> adding a table should not take more than 2 files that are never touched
> again :-D. Update.php will have to be run anyway on core updates. Handling
> mysql and queries is way more difficult than creating it in the first
> place!
>
> Or maybe we are not understanding what you are trying to achieve. 0:-)
>
> On Mon, Jan 27, 2020 at 5:00 PM Jeroen De Dauw <[email protected]>
> wrote:
>
> > Hey,
> >
> > > Why are you so reluctant to create a table?
> >
> > It complicates extension installation and adds yet another thing to
> > maintain. Which is a bit silly for a handful of values. I was hoping
> > MediaWiki would have a generic table to put such things already.
> Page_props
> > is exactly that, just bound to specific pages.
> >
> > 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
> > [email protected]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
>
> --
> Jaime Crespo
> <http://wikimedia.org>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to