mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2026-01-04 15:31:37 +00:00
feat: rework locked maps syncing (#464)
* Better maps syncing (#2) * Do not create new views for maps from current world * Fix maps in shulkers not converting * Add bundle support for map conversion * Rework map sync * Fix empty statements in database * Fix missing imports * Rename connectMapIds -> bindMapIds * Use data adapter to save maps * Split Mongo readMapData * Split MySQL readMapData * Split Postgres readMapData * Update database schemas Use server names instead of world UUIDs * Update Database class * Update MongoDbDatabase class * Update MySqlDatabase class * Update PostgresDatabase class * Update BukkitMapPersister class Use server names instead of world UUIDs * Remove unused code * Add my nickname to contributors :) * Start implementing Redis map caching * Continue implementing Redis map caching * Bind map ids on Redis before writing to DB * Finish implementing Redis map data caching * refactor: decouple new map logic Redis caching from DB * test: enable debug logging in test suite * docs: update docs with new username method * feat: adjust a method name --------- Co-authored-by: Sóla Lusøt <60041069+solaluset@users.noreply.github.com>
This commit is contained in:
@@ -26,4 +26,26 @@ CREATE TABLE IF NOT EXISTS `%user_data_table%`
|
||||
PRIMARY KEY (`version_uuid`, `player_uuid`),
|
||||
FOREIGN KEY (`player_uuid`) REFERENCES `%users_table%` (`uuid`) ON DELETE CASCADE
|
||||
) CHARACTER SET utf8
|
||||
COLLATE utf8_unicode_ci;
|
||||
COLLATE utf8_unicode_ci;
|
||||
|
||||
# Create the map data table if it does not exist
|
||||
CREATE TABLE IF NOT EXISTS `%map_data_table%`
|
||||
(
|
||||
`server_name` varchar(32) NOT NULL,
|
||||
`map_id` int NOT NULL,
|
||||
`data` longblob NOT NULL,
|
||||
PRIMARY KEY (`server_name`, `map_id`)
|
||||
) CHARACTER SET utf8
|
||||
COLLATE utf8_unicode_ci;
|
||||
|
||||
# Create the map ids table if it does not exist
|
||||
CREATE TABLE IF NOT EXISTS `%map_ids_table%`
|
||||
(
|
||||
`from_server_name` varchar(32) NOT NULL,
|
||||
`from_id` int NOT NULL,
|
||||
`to_server_name` varchar(32) NOT NULL,
|
||||
`to_id` int NOT NULL,
|
||||
PRIMARY KEY (`from_server_name`, `from_id`, `to_server_name`),
|
||||
FOREIGN KEY (`from_server_name`, `from_id`) REFERENCES `%map_data_table%` (`server_name`, `map_id`) ON DELETE CASCADE
|
||||
) CHARACTER SET utf8
|
||||
COLLATE utf8_unicode_ci;
|
||||
|
||||
Reference in New Issue
Block a user