mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-25 12:25:37 +01:00
Split up MySQL upgrade query to resolve issues from interrupted queries
This commit is contained in:
parent
054beb700b
commit
df9b478be7
@ -15,7 +15,73 @@ public class __2_22_0 {
|
|||||||
try {
|
try {
|
||||||
if (Config.getGlobal().MYSQL) {
|
if (Config.getGlobal().MYSQL) {
|
||||||
try {
|
try {
|
||||||
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN line_5 VARCHAR(100), ADD COLUMN line_6 VARCHAR(100), ADD COLUMN line_7 VARCHAR(100), ADD COLUMN line_8 VARCHAR(100), ADD COLUMN color_secondary INT, ADD COLUMN waxed TINYINT DEFAULT 0, ADD COLUMN face TINYINT DEFAULT 0;");
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN line_5 VARCHAR(100);");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN line_6 VARCHAR(100);");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN line_7 VARCHAR(100);");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN line_8 VARCHAR(100);");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN color_secondary INT;");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN waxed TINYINT DEFAULT 0;");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Patch.continuePatch()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "sign ADD COLUMN face TINYINT DEFAULT 0;");
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "sign", Selector.FIRST, Selector.FIRST));
|
||||||
|
Loading…
Reference in New Issue
Block a user