-
Notifications
You must be signed in to change notification settings - Fork 1
Update for MediaWiki 1.38 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jeffw16
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I left a few comments
sqlite-to-csv.php
Outdated
| $sqlite_ext = '.sqlite'; | ||
| $path_to_tables_file = '/path/to/tables-1.35.txt'; | ||
| $sqlite_ext = 'sqlite'; | ||
| $path_to_tables_file = '/path/to/tables-1.xx.txt'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a distinction that this is for the tables desired in the new version? Otherwise people might think this is the same as the other xx which is not true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that the purpose of MediaWiki-SQLite-to-MySQL was to transfer data of a MediaWiki installation from SQLite to MySQL. Is it also meant for switching MediaWiki versions in the process? If not, xx should indeed be the same in both files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TobiasKaiser it can do both, which is why the distinction should be made. The 1.31 vs. 1.35 in the old code, although hardcoded, was not a mistake.
csv-to-mysql.php
Outdated
|
|
||
| $path_to_tables_file = '/path/to/tables-1.xx.txt'; | ||
| $path_to_schema_file = '/path/to/mediawiki-1.31.0-schema-with-confirmacct.sql'; | ||
| $path_to_schema_file = '/path/to/mediawiki-1.xx-schema-with-confirmacct.sql'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a distinction here that it's referring to the old schema rather than the new schema?
|
As requested, the sample filenames now highlight that MediaWiki versions of input and output database can differ. |
jeffw16
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks @TobiasKaiser, merging this PR |
The MySQL post-processing command in csv-to-mysql.php gave me a gew minor errors. Two SQL queries, which I discarded, referenced columns that were dropped from MW's DB schema. I added a query to fix values of the comment_data in the comment table.
I also removed two references to specific outdated MW versions.
In this form, the script worked for me when converting a MW 1.38 SQLite DB with almost no MW plugins installed to MySQL/MariaDB.