Commit Graph

22 Commits

Author SHA1 Message Date
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
avery
0b9e97625e
Remove parentheses from ADD reporter_id 2022-07-30 22:09:45 -07:00
Jett
c9cd7a200a
Merge pull request #634 from DarkflameUniverse/migration-runner
Add a argument to the MasterServer for running migrations
2022-07-12 11:17:42 +01:00
Jett
d642de9462 Implement a migration runner 2022-07-12 02:16:08 +01:00
David Markowitz
06217ad5e3
Address friends list IDs and removal of friends (#628)
* Add friends list migration

* Change friends to use charID

Update friends table to use charID and not LWOOBJID variant.

* Fix remove friend

Fix remove friend and make the query more readable at a glance.

* Add and remove friends in the container

Properly add and remove friends in the player container
2022-07-10 17:59:07 -07:00
Aaron Kimbre
d42cbb2473 make newline at end of file 2022-04-19 21:36:09 -05:00
Aaron Kimbre
d4adb0e6e5 Fix migration 0 for cd server
setting every component to 1901 instead of just component 39
Add migration to fix it for existing users
and set the values back to what they were
2022-04-19 21:30:38 -05:00
EmosewaMC
77c6350f03 updated initial migration
Made it so people wont accidentally wipe their database if 0_initial.sql is ever run again
2022-04-09 00:48:14 -07:00
EmosewaMC
3900267fed added comment 2022-04-09 00:31:18 -07:00
EmosewaMC
0a494422b7 Added migration for plunger gun 2022-04-09 00:22:02 -07:00
David Markowitz
db0f363967
Merge pull request #476 from EmosewaMC/bugReportFixing
Added more specific bug reporting.  There is a new migration called migrations/dlu/2_reporter_id.sql to run on the database.
2022-04-01 15:12:58 -07:00
EmosewaMC
5c16dd11f4 altered table now has a default for performance cost 2022-03-30 00:37:36 -07:00
EmosewaMC
e79d4e66f3 add performance cost column 2022-03-29 19:46:38 -07:00
EmosewaMC
6499139a49 moved addition to new migration. 2022-03-24 01:11:21 -07:00
EmosewaMC
22a00de8cd added char id column 2022-03-20 20:46:15 -07:00
EmosewaMC
150dec1cc2 Added file to run on table charinfo to allow for unique names only
Created a new file to run on the MySQL database to alter the MySQL table charinfo.names to only allow unique entries
2022-01-09 00:12:49 -08:00
EmosewaMC
01230e2575 Revert change in 0_initial.sql 2022-01-09 00:09:27 -08:00
EmosewaMC
b529b7d3a0 Added UNIQUE for charInfo table
Added UNIQUE for charInfo table.
2022-01-08 00:00:27 -08:00
Ramen2X
ca287db536
make 0_initial.sql compatible with MySQL 2021-12-06 20:06:12 -05:00
Avery
0a9d4d0d66
Update 0_nt_footrace.sql 2021-12-05 19:28:06 -08:00
Avery
bcfa1fb906
Update 1_fix_overbuild_mission.sql 2021-12-05 19:27:45 -08:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00