View Single Post
Nikey646
Member
Join Date: Apr 2011
Old 04-29-2014 , 02:11   Re: [TF2] Player Ranks
Reply With Quote #117

Here is a small Migration script for converting the SQLite Database to MySQL, to save people time and trouble of trying to migrate it themselves, or having to reset your ranks because of the change.

This is a 100% process, with the only requirement is that it has a MySQL User, w/ All Permissions (Recommended to be deleted/modified afterwards to remove unrequired permissions). Assuming the sql.json provided is upto date, it can create the table's from scratch. It can also even create the database if it doesn't exist (Some shared hosting environments will have problems with that!)

This isn't a 100% full proof script, but in most cases it should work...I say should because the largest database i've tested it with was 38 players...(If someone has a larger database, and don't mind sharing it with me, so i can test and improve the script, that would be wonderful~)

The script is best run through console. I've provided an example Batch file to run it through console (You will need to change the location of php.exe in there, linux users will need to do some magical linux like things), however the script also works as a web page. The console just shows information in real time, while the html page will wait until it's finished executing before showing you.

You will need to configure the settings array inside of settings.php...Everything is fairly self explantory and it has comments! The main convert.php file also has Comments, but only people who understand php should look at that, i did make it in a rush xD

Warning

Updating

Some More Information


Uhh, i think thats all ^_^
Instant Edit: This is for a php environment and requires the PDO Extension!
Attached Files
File Type: zip SQLite to MySQL Migration Script.zip (4.5 KB, 148 views)

Last edited by Nikey646; 04-29-2014 at 02:11.
Nikey646 is offline