Skip to content

Commit b0f9b4c

Browse files
AndrewKostkarosalieperoutdooracorn
authored
Add database script for MediaWiki 1.43 (#882)
* Add database script for MediaWiki 1.43 * Switch to database version mw1.43-wbs1 * Update database script * Update mw1.43-wbs1.sql (#968) * Update database/mw/README.md Co-authored-by: Ollie <[email protected]> --------- Co-authored-by: Perside Rosalie <[email protected]> Co-authored-by: Ollie <[email protected]>
1 parent fc2784e commit b0f9b4c

File tree

5 files changed

+1207
-6
lines changed

5 files changed

+1207
-6
lines changed

config/wbstack.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
'ui_url' => env('WBSTACK_UI_URL', 'https://wbstack.com'),
77

8-
'wiki_db_provision_version' => env('WBSTACK_WIKI_DB_PROVISION_VERSION', 'mw1.39-wbs1'),
9-
'wiki_db_use_version' => env('WBSTACK_WIKI_DB_USE_VERSION', 'mw1.39-wbs1'),
8+
'wiki_db_provision_version' => env('WBSTACK_WIKI_DB_PROVISION_VERSION', 'mw1.43-wbs1'),
9+
'wiki_db_use_version' => env('WBSTACK_WIKI_DB_USE_VERSION', 'mw1.43-wbs1'),
1010
'wiki_hard_delete_threshold' => env('WBSTACK_HARD_DELETE_THRESHOLD', 30),
1111
'wiki_max_per_user' => env('WBSTACK_MAX_PER_USER', false),
1212

database/mw/README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This directory contains the SQL needed to create and wiki DBs.
1111

1212
**Versions**
1313

14+
- mw1.43-wbs1 - First 1.43 install
1415
- mw1.39-wbs1 - First 1.39 install
1516
- mw1.38-wbs1 - First 1.38 install
1617
- mw1.35-wbs1 - First 1.35 install
@@ -26,9 +27,25 @@ This directory contains the SQL needed to create and wiki DBs.
2627
Make sure you have updated the docker-compose-clean.yml to:
2728

2829
- For adding extensions?
29-
- Include the latest version of the Mediawiki image with the new code added but not loaded (for extensions)
3030
- Update maintWikWiki.json to match the defaults needs to load all extension from the mw image
3131

32+
33+
**Preparing the MediaWiki image:**
34+
35+
Checkout the [wbstack/mediawiki](https://github.com/wbstack/mediawiki) pull request for the new version of MediaWiki you want to build the sql file for and navigate to it.
36+
37+
Remove any empty extension directories generated by the sync script. You can use the following command to help locate them if they exist:
38+
39+
```
40+
git clean -nd
41+
```
42+
43+
Build the image locally using:
44+
45+
```
46+
docker build -t local-wbaas-mediawiki .
47+
```
48+
3249
**Start the setup:**
3350

3451
```
@@ -62,7 +79,7 @@ cd ./w/extensions/ && ls -dm * | tr -d ' ' | tr -d \\n && cd ./../../
6279

6380
This is an example install command with `WikibaseEdtf` excluded:
6481
```
65-
WBS_DOMAIN=maint php ./w/maintenance/install.php --dbserver sql-clean --dbuser root --dbpass toor --dbname wiki --extensions AdvancedSearch,Auth_remoteuser,CirrusSearch,Cite,CodeEditor,CodeMirror,ConfirmAccount,ConfirmEdit,DeleteBatch,Echo,Elastica,EmbedVideo,EntitySchema,Gadgets,Graph,InviteSignup,JsonConfig,Kartographer,Mailgun,Math,MobileFrontend,MultimediaViewer,Nuke,OAuth,PageImages,ParserFunctions,Poem,Popups,RevisionSlider,Score,Scribunto,SecureLinkFixer,SpamBlacklist,StopForumSpam,SyntaxHighlight_GeSHi,TemplateData,TemplateSandbox,TextExtracts,Thanks,ThatSrc,TorBlock,TwoColConflict,UniversalLanguageSelector,WikiEditor,WikiHiero,Wikibase,WikibaseCirrusSearch,WikibaseExampleData,WikibaseInWikitext,WikibaseLexeme,WikibaseLexemeCirrusSearch,WikibaseManifest,cldr --pass AdminPass0 SiteName AdminName
82+
WBS_DOMAIN=maint php ./w/maintenance/install.php --dbserver sql-clean --dbuser root --dbpass toor --dbname wiki --extensions AdvancedSearch,CirrusSearch,Cite,CodeEditor,CodeMirror,ConfirmAccount,ConfirmEdit,DeleteBatch,Echo,Elastica,EmbedVideo,EntitySchema,Gadgets,InviteSignup,JsonConfig,Kartographer,Mailgun,Math,MobileFrontend,MultimediaViewer,Nuke,OAuth,PageImages,ParserFunctions,Poem,RevisionSlider,Score,Scribunto,SecureLinkFixer,SpamBlacklist,StopForumSpam,SyntaxHighlight_GeSHi,TemplateData,TemplateSandbox,TextExtracts,Thanks,ThatSrc,TorBlock,TwoColConflict,UniversalLanguageSelector,VisualEditor,WikiEditor,WikiHiero,Wikibase,WikibaseCirrusSearch,WikibaseInWikitext,WikibaseLexeme,WikibaseLexemeCirrusSearch,WikibaseManifest,cldr --pass AdminPass0 SiteName AdminName
6683
```
6784

6885
**While** https://phabricator.wikimedia.org/T267809 is broken you'll then need to edit the auto generated LocalSettings.php file...

database/mw/cleanSql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// TODO allow passing in file? or run for all files?
88
$placeholder = '<<prefix>>_';
9-
$filename = __DIR__ . '/new/mw1.39-wbs1.sql';
9+
$filename = __DIR__ . '/new/mw1.43-wbs1.sql';
1010

1111
// Get the file
1212
$text = file_get_contents($filename);

database/mw/docker-compose-clean.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22

33
mediawiki:
4-
image: ghcr.io/wbstack/mediawiki:1.39-7.4-20230328-0
4+
image: local-wbaas-mediawiki
55
volumes:
66
- ./maintWikWiki.json:/var/www/html/w/maintWikWiki.json
77
- ./new:/var/www/html/w/maintenance/wbaas-api/new

0 commit comments

Comments
 (0)