diff --git a/common/src/main/java/net/draycia/carbon/common/users/db/DatabaseUserManager.java b/common/src/main/java/net/draycia/carbon/common/users/db/DatabaseUserManager.java index 1c9ec3ff..d2f94b2c 100644 --- a/common/src/main/java/net/draycia/carbon/common/users/db/DatabaseUserManager.java +++ b/common/src/main/java/net/draycia/carbon/common/users/db/DatabaseUserManager.java @@ -74,7 +74,6 @@ public abstract class DatabaseUserManager extends CachingUserManager { .bind("muted", player.muted()) .bind("deafened", player.deafened()) .bind("selectedchannel", player.selectedChannelKey()) - .bind("username", player.username()) // todo remove from db? .bind("displayname", player.displayNameRaw()) .bind("lastwhispertarget", player.lastWhisperTarget()) .bind("whisperreplytarget", player.whisperReplyTarget()) diff --git a/common/src/main/resources/queries/migrations/mysql/V4__drop_usernames.sql b/common/src/main/resources/queries/migrations/mysql/V4__drop_usernames.sql new file mode 100644 index 00000000..432e9dd2 --- /dev/null +++ b/common/src/main/resources/queries/migrations/mysql/V4__drop_usernames.sql @@ -0,0 +1 @@ +ALTER TABLE carbon_users DROP COLUMN username; diff --git a/common/src/main/resources/queries/migrations/postgresql/V4__drop_usernames.sql b/common/src/main/resources/queries/migrations/postgresql/V4__drop_usernames.sql new file mode 100644 index 00000000..432e9dd2 --- /dev/null +++ b/common/src/main/resources/queries/migrations/postgresql/V4__drop_usernames.sql @@ -0,0 +1 @@ +ALTER TABLE carbon_users DROP COLUMN username; diff --git a/common/src/main/resources/queries/mysql/insert-player.sql b/common/src/main/resources/queries/mysql/insert-player.sql index 53344a9e..1986f01c 100644 --- a/common/src/main/resources/queries/mysql/insert-player.sql +++ b/common/src/main/resources/queries/mysql/insert-player.sql @@ -3,7 +3,6 @@ INSERT INTO carbon_users SET muted = :muted, deafened = :deafened, selectedchannel = :selectedchannel, - username= :username, displayname = :displayname, lastwhispertarget = UNHEX(REPLACE(:lastwhispertarget, '-', '')), whisperreplytarget = UNHEX(REPLACE(:whisperreplytarget, '-', '')), @@ -13,7 +12,6 @@ ON DUPLICATE KEY UPDATE muted = :muted, deafened = :deafened, selectedchannel = :selectedchannel, - username= :username, displayname = :displayname, lastwhispertarget = UNHEX(REPLACE(:lastwhispertarget, '-', '')), whisperreplytarget = UNHEX(REPLACE(:whisperreplytarget, '-', '')), diff --git a/common/src/main/resources/queries/postgresql/insert-player.sql b/common/src/main/resources/queries/postgresql/insert-player.sql index dff4d5f9..ccc02476 100644 --- a/common/src/main/resources/queries/postgresql/insert-player.sql +++ b/common/src/main/resources/queries/postgresql/insert-player.sql @@ -3,7 +3,6 @@ INSERT INTO carbon_users SET muted = :muted, deafened = :deafened, selectedchannel = :selectedchannel, - username= :username, displayname = :displayname, lastwhispertarget = :lastwhispertarget, whisperreplytarget = :whisperreplytarget, @@ -13,7 +12,6 @@ ON CONFLICT (id) DO UPDATE SET muted = :muted, deafened = :deafened, selectedchannel = :selectedchannel, - username= :username, displayname = :displayname, lastwhispertarget = :lastwhispertarget, whisperreplytarget = :whisperreplytarget,