Migration tips: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=== Update database by installer ===
= Important Tables =
# Backup old database.
# Install the latest LTS version.
# Apply original database settings.
# Press continue to upgrade database by installer.


=== Update database by maintenance tool (for SQLite) ===
<pre>
# Backup old wiki.
actor
# Install the latest LTS version.
catrgory
# Generate a new '''LocalSettings.php'''.
categorylinks
# Move SQLite file to the path of database.
content
# Run '''php maintenance/update.php'''.
externallinks
 
job
=== Trouble shooting ===
page
If a new primary key or unique key was defined in new version.
pagelinks
 
recentchanges
The SQL command '''INSERT INTO ... SELECT ...''' might be failed.
revision
 
revision_comment_temp
At that time, the table cannot be migrate by updating tool.
text
 
updatelog
# Export data of this table as SQL format.
user
# Run '''php maintenance/update.php'''.
watchlist
# Import data manually.
</pre>
 
=== Using Docker ===
It's easy to maintain requirements of MediaWiki by docker.
 
It's better to place some files and directories in volumes like:
 
* LocalSettings.php
* mywiki.sqlite
* images directory
* custom extensions
* php error log
* php-fpm error log
* nginx error log
* nginx access log

Revision as of 17:15, 23 April 2025

Important Tables

actor
catrgory
categorylinks
content
externallinks
job
page
pagelinks
recentchanges
revision
revision_comment_temp
text
updatelog
user
watchlist