Re: [Wikitech-l] Storing some values in the DB

2020-02-08 Thread crawlspaces via Wikitech-l
What about log_search, which is intended for permanent storage of data; could your extension generate a log event and then use that log_id as the ls_log_id? https://www.mediawiki.org/wiki/Manual:Log_search_table Maybe there could be a new type of log_type/log_action introduced, e.g.

Re: [Wikitech-l] Storing some values in the DB

2020-01-29 Thread Jeroen De Dauw
Hey, Sounds like you just want a simple key value store that. > I don't believe mediawiki has a table or interface for this. > Indeed. > 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

Re: [Wikitech-l] Storing some values in the DB

2020-01-29 Thread Addshore
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

Re: [Wikitech-l] Storing some values in the DB

2020-01-28 Thread Jaime Crespo
> 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

Re: [Wikitech-l] Storing some values in the DB

2020-01-27 Thread Thiemo Kreuz
Again. What exactly are you trying to store? How often is it suspected to change? Who will be allowed to change it? Why not make it configuration via LocalSettings.php? What is the problem with an extra table? ___ Wikitech-l mailing list

Re: [Wikitech-l] Storing some values in the DB

2020-01-27 Thread Jeroen De Dauw
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

Re: [Wikitech-l] Storing some values in the DB

2020-01-27 Thread Thiemo Kreuz
Jeroen, can you please provide more context? What exactly are you trying to store? Why? How often? When will it be changed? By whom? As of now the rather vague explanation provided make it sound like it's a configuration flag, and should go into LocalSettings.php as a $wgYourExtensionYourConfig =

Re: [Wikitech-l] Storing some values in the DB

2020-01-27 Thread Jeroen De Dauw
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

Re: [Wikitech-l] Storing some values in the DB

2020-01-27 Thread Kosta Harlan
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

[Wikitech-l] Storing some values in the DB

2020-01-27 Thread Jeroen De Dauw
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