Commit Graph

20 Commits

Author SHA1 Message Date
Aaron Kimbre
30fbdd3956 WIP 2022-12-20 08:14:58 -06:00
Demetri Van Sickle
fde62a4777
Fixed typo (#875) 2022-12-06 08:36:42 -06:00
Aaron Kimbrell
d8945e9067
Add migration to make play_key_id nullable (#857)
since there is an option not to use play_keys
2022-12-02 03:46:54 -08:00
David Markowitz
d4af7d76a2
Add property behaviors migration (#790)
* Add behaviors migration

Add migration for behaviors.  Tested that the tables get altered correctly, names are set correctly.

Tested that I can place models, both regular and Brick-by-Brick ones and that they get deleted properly.  Tested that picking up models and re-placing them down properly updates them in the tables.

* Only update when empty
2022-10-31 17:31:49 -05:00
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
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
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
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00