[aur-dev] [PATCH] Resize the LastLoginIPAddress column

Lukas Fleischer lfleischer at archlinux.org
Tue Mar 15 19:02:21 UTC 2016


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

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 schema/aur-schema.sql | 2 +-
 upgrading/4.3.0.txt   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index aa5ed9d..0804ac3 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -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,
diff --git a/upgrading/4.3.0.txt b/upgrading/4.3.0.txt
index 0d3a9b7..34b19a2 100644
--- a/upgrading/4.3.0.txt
+++ b/upgrading/4.3.0.txt
@@ -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;
+----
-- 
2.7.3


More information about the aur-dev mailing list