mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-09 05:53:22 +00:00
Fixeds #276
This commit is contained in:
parent
3d30e3abbc
commit
956899cb67
4 changed files with 116 additions and 9 deletions
|
@ -586,18 +586,11 @@ public class SQLManager implements AbstractDB {
|
|||
final DatabaseMetaData data = this.connection.getMetaData();
|
||||
ResultSet rs = data.getColumns(null, null, this.prefix + "plot_comments", "plot_plot_id");
|
||||
if (rs.next()) {
|
||||
rs.close();
|
||||
rs = data.getColumns(null, null, this.prefix + "plot_comments", "hashcode");
|
||||
if (!rs.next()) {
|
||||
rs.close();
|
||||
try {
|
||||
final Statement statement = this.connection.createStatement();
|
||||
statement.addBatch("ALTER IGNORE TABLE `" + this.prefix + "plot_comments` ADD `inbox` VARCHAR(11) DEFAULT `public`");
|
||||
statement.addBatch("ALTER IGNORE TABLE `" + this.prefix + "plot_comments` ADD `timestamp` INT(11) DEFAULT 0");
|
||||
statement.addBatch("ALTER TABLE `" + this.prefix + "plot` DROP `tier`");
|
||||
statement.executeBatch();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
final Statement statement = this.connection.createStatement();
|
||||
statement.addBatch("DROP TABLE `" + this.prefix + "plot_comments`");
|
||||
if (PlotSquared.getMySQL() != null) {
|
||||
|
@ -609,6 +602,14 @@ public class SQLManager implements AbstractDB {
|
|||
statement.executeBatch();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
final Statement statement = this.connection.createStatement();
|
||||
statement.addBatch("ALTER IGNORE TABLE `" + this.prefix + "plot_comments` ADD `inbox` VARCHAR(11) DEFAULT `public`");
|
||||
statement.addBatch("ALTER IGNORE TABLE `" + this.prefix + "plot_comments` ADD `timestamp` INT(11) DEFAULT 0");
|
||||
statement.addBatch("ALTER TABLE `" + this.prefix + "plot` DROP `tier`");
|
||||
statement.executeBatch();
|
||||
statement.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue