Resize the LastLoginIPAddress column

Make sure that all valid IPv6 addresses fit into the LastLoginIPAddress
field.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2016-03-15 18:01:15 +01:00
parent ff36b23153
commit 0108c64541
2 changed files with 7 additions and 1 deletions

View file

@ -35,7 +35,7 @@ CREATE TABLE Users (
IRCNick VARCHAR(32) NOT NULL DEFAULT '',
PGPKey VARCHAR(40) NULL DEFAULT NULL,
LastLogin BIGINT UNSIGNED NOT NULL DEFAULT 0,
LastLoginIPAddress VARCHAR(40) NULL DEFAULT NULL,
LastLoginIPAddress VARCHAR(45) NULL DEFAULT NULL,
InactivityTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CommentNotify TINYINT(1) NOT NULL DEFAULT 1,

View file

@ -3,3 +3,9 @@
----
ALTER TABLE Users ADD COLUMN OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1;
----
2. Resize the LastLoginIPAddress column:
----
ALTER TABLE Users MODIFY LastLoginIPAddress VARCHAR(45) NULL DEFAULT NULL;
----