DarkflameServer/dGame
David Markowitz c13937bd1f
Address Brick-By-Brick builds not properly saving and make migrations automatic (#725)
* Properly store BBB in database

Store the BBB data in the database as the received SD0 packet as opposed to just the raw lxfml.  Addressed several memory leaks as well.

* Add Sd0Conversion

Add brick by brick conversion commands with 2 parameters to tell the program what to do with the data.

Add zlib -> sd0 conversion.  Files look good at a glance but should be tested in game to ensure stability.  Tests to come.

* moving to laptop

ignore this commit.  I need to move this to my laptop

* Add functionality to delete bad models

Adds functionality to delete bad models.  Models are batched together and deleted in one commit.

More testing is needed to ensure data safety.  Positive tests on a live database reveal the broken models were truncated and complete ones were kept around successfully.  Tests should be done to ensure larger sd0 models are properly saved and not truncated since this command should be able to be run any time.

Valgrind tests need to be run as well to ensure no memory leaks exist.

* Delete from query change

Changed from delete to delete cascade and instead deleting from properties_contents as opposed to ugc.

* Address numerous bugs

DELETE CASCADE is not a valid SQL command so this was changed to a better delete statement.

Added user confirmation before deleting a broken model.
Address appending the string model appending bad data, causing excess deletion.
Addressed memory leaks with sql::Blob

* Error handling for string

* Even more proper handling...

* Add bounds check for cli command

Output a message if a bad command is used.

Update MasterServer.cpp

* Remove user interference

-Add back in mariadb build jobs so i dont nuke others systems
- Remove all user interference and consolidate work into one command since 1 depends on the next.

* Add comments

test

Revert "test"

This reverts commit fb831f268b7a2f0ccd20595aff64902ab4f4b4ee.

* Update CMakeMariaDBLists.txt

Test

* Improve migration runner

Migration runner now runs automatically.
- Resolved an issue where extremely large sql queries caused the database to go into an invalid state.
- Made migrations run automatically on server start.
- Resolved a tiny memory leak in migration runner? (discarded returned pointer)
- Moved sd0 migrations of brick models to be run automatically with migration runner.
- Created dummy file to tell when brick migrations have been run.

* Update README

Updated the README to reflect the new server migration state.

* Make model deleter actually delete models

My complicated sql actually did nothing...  Tested that this new SQL properly gets rid of bad data.

* Revert "Update CMakeMariaDBLists.txt"

This reverts commit 8b859d8529.
2022-10-24 17:20:36 -05:00
..
dBehaviors Merge pull request #719 from DarkflameUniverse/unix-line-endings 2022-08-08 09:33:43 -05:00
dComponents Mounts v2 (#726) 2022-09-02 13:49:19 -05:00
dEntity format codebase 2022-07-28 08:39:57 -05:00
dGameMessages Address Brick-By-Brick builds not properly saving and make migrations automatic (#725) 2022-10-24 17:20:36 -05:00
dInventory Resolve incorrectly marked consumables being unusable (#770) 2022-09-05 17:28:32 -05:00
dMission convert to unix line endings 2022-08-05 22:01:59 -05:00
dUtilities Mounts v2 (#726) 2022-09-02 13:49:19 -05:00
Character.cpp Selective saving for map and location (#732) 2022-08-16 20:53:28 -05:00
Character.h Implement flying command (#713) 2022-08-06 01:19:34 -07:00
CMakeLists.txt Modularize CMakeLists for submodules (#736) 2022-08-18 19:23:42 -07:00
Entity.cpp Mounts v2 (#726) 2022-09-02 13:49:19 -05:00
Entity.h format codebase 2022-07-28 08:39:57 -05:00
EntityManager.cpp format codebase 2022-07-28 08:39:57 -05:00
EntityManager.h format codebase 2022-07-28 08:39:57 -05:00
LeaderboardManager.cpp use UTF8ToUTF16 more (#695) 2022-08-02 08:56:20 -05:00
LeaderboardManager.h format codebase 2022-07-28 08:39:57 -05:00
Player.cpp convert to unix line endings 2022-08-05 22:01:59 -05:00
Player.h convert to unix line endings 2022-08-05 22:01:59 -05:00
TeamManager.cpp format codebase 2022-07-28 08:39:57 -05:00
TeamManager.h format codebase 2022-07-28 08:39:57 -05:00
TradingManager.cpp format codebase 2022-07-28 08:39:57 -05:00
TradingManager.h format codebase 2022-07-28 08:39:57 -05:00
User.cpp format codebase 2022-07-28 08:39:57 -05:00
User.h format codebase 2022-07-28 08:39:57 -05:00
UserManager.cpp format codebase 2022-07-28 08:39:57 -05:00
UserManager.h format codebase 2022-07-28 08:39:57 -05:00