diff --git a/gradle.properties b/gradle.properties index cc8e72a..d01acf0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -53,7 +53,7 @@ mod_name=Zontreck's Library Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1201.13.042424.0339 +mod_version=1201.13.042424.0415 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/libzontreck/memory/world/DatabaseMigrations.java b/src/main/java/dev/zontreck/libzontreck/memory/world/DatabaseMigrations.java index 8020df9..feb2415 100644 --- a/src/main/java/dev/zontreck/libzontreck/memory/world/DatabaseMigrations.java +++ b/src/main/java/dev/zontreck/libzontreck/memory/world/DatabaseMigrations.java @@ -133,6 +133,15 @@ public class DatabaseMigrations migrations.add(blocksUpdate); + migrations.add(builder() + .withTableID("blocks") + .withVersion(3) + .withMigrationAction(DatabaseWrapper.get().prepareStatement(" ALTER TABLE `blocks` DROP INDEX `posX`; ")) + .withMigrationAction(DatabaseWrapper.get().prepareStatement(" ALTER TABLE `blocks` DROP INDEX `posY`; ")) + .withMigrationAction(DatabaseWrapper.get().prepareStatement(" ALTER TABLE `blocks` DROP INDEX `posZ`; ")) + .withMigrationAction(DatabaseWrapper.get().prepareStatement("ALTER TABLE `savedBlocks`.`blocks` ADD UNIQUE (`posX`, `posY`, `posZ`); "))); + + RegisterMigrationsEvent rme = new RegisterMigrationsEvent(); MinecraftForge.EVENT_BUS.post(rme);