Skip to content

Commit

Permalink
widen ip column for loginlog
Browse files Browse the repository at this point in the history
  • Loading branch information
kareila authored and zorkian committed Dec 7, 2020
1 parent 06db0e4 commit c156e85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/upgrading/update-db-general.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@
logintime INT UNSIGNED NOT NULL,
INDEX (userid, logintime),
sessid MEDIUMINT UNSIGNED NOT NULL,
ip VARCHAR(15),
ip VARCHAR(45),
ua VARCHAR(100)
)
EOC
Expand Down Expand Up @@ -4170,6 +4170,11 @@
do_alter( "userlog", "ALTER TABLE userlog MODIFY ip VARCHAR(45)" );
}

# widen ip column for IPv6 addresses
if ( column_type( "loginlog", "ip" ) eq "varchar(15)" ) {
do_alter( "loginlog", "ALTER TABLE loginlog MODIFY ip VARCHAR(45)" );
}

unless ( column_type( 'ml_items', 'itcode' ) =~ /120/ ) {
do_alter( 'ml_items',
"ALTER TABLE ml_items MODIFY COLUMN itcode VARCHAR(120) CHARACTER SET ascii NOT NULL"
Expand Down

0 comments on commit c156e85

Please sign in to comment.