made network migration repeatable
This commit is contained in:
1 parent
84c3e7df13
commit
ee265a858c
1 file changed
+2
-2
@@ -1,6 +1,6 @@
|
||||
-- Connection key per attempt: the IPv4 address or the IPv6 /64 prefix. Groups accounts by internet connection.
|
||||
ALTER TABLE login_attempts
|
||||
ADD COLUMN network VARCHAR(45) NULL COMMENT 'IPv4 address or IPv6 /64 prefix, NULL if unknown' AFTER ip,
|
||||
ADD KEY idx_network_at (network, at);
|
||||
ADD COLUMN IF NOT EXISTS network VARCHAR(45) NULL COMMENT 'IPv4 address or IPv6 /64 prefix, NULL if unknown' AFTER ip,
|
||||
ADD KEY IF NOT EXISTS idx_network_at (network, at);
|
||||
|
||||
UPDATE login_attempts SET network = ip WHERE ip REGEXP '^[0-9]{1,3}([.][0-9]{1,3}){3}$';
|
||||
Reference in new issue
Block a user