Remove ALTER statement, modifications have been done.

This commit is contained in:
Keir 2015-11-10 21:22:21 +00:00
parent fa9530b5bf
commit 7d63a95ec9

View File

@ -18,7 +18,6 @@ public class PreferencesRepository extends RepositoryBase
//private static String CREATE_ACCOUNT_TABLE = "CREATE TABLE IF NOT EXISTS accountPreferences (id INT NOT NULL AUTO_INCREMENT, uuid VARCHAR(256), games BOOL NOT NULL DEFAULT 1, visibility BOOL NOT NULL DEFAULT 1, showChat BOOL NOT NULL DEFAULT 1, friendChat BOOL NOT NULL DEFAULT 1, privateMessaging BOOL NOT NULL DEFAULT 1, partyRequests BOOL NOT NULL DEFAULT 0, invisibility BOOL NOT NULL DEFAULT 0, forcefield BOOL NOT NULL DEFAULT 0, showMacReports BOOL NOT NULL DEFAULT 0, ignoreVelocity BOOL NOT NULL DEFAULT 0, showUserReports BOOL NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE INDEX uuid_index (uuid));";
private static String INSERT_ACCOUNT = "INSERT INTO accountPreferences (uuid) VALUES (?) ON DUPLICATE KEY UPDATE uuid=uuid;";
private static String UPDATE_ACCOUNT_PREFERENCES = "UPDATE accountPreferences SET games = ?, visibility = ?, showChat = ?, friendChat = ?, privateMessaging = ?, partyRequests = ?, invisibility = ?, forcefield = ?, showMacReports = ?, ignoreVelocity = ?, pendingFriendRequests = ?, friendDisplayInventoryUI = ?, showUserReports = ? WHERE uuid=?;";
private static String ADD_USER_REPORTS_COLUMN = "ALTER TABLE accountPreferences ADD showUserReports BOOL DEFAULT 0 NOT NULL;";
public PreferencesRepository(JavaPlugin plugin)
{
@ -29,7 +28,6 @@ public class PreferencesRepository extends RepositoryBase
protected void initialize()
{
//executeUpdate(CREATE_ACCOUNT_TABLE);
executeUpdate(ADD_USER_REPORTS_COLUMN);
}
@Override