IPv6 compatible schema (#355)

This is in reference to #355
An IPv6 address can be up to 39 characters, so change the IP column to correspond. This won't help existing users.
This commit is contained in:
Kaleb 2017-10-22 21:09:28 -04:00 committed by GitHub
parent 88ee6d26d1
commit 488792a142

View File

@ -43,7 +43,7 @@ public class IPsTable extends UserIDTable {
public void createTable() throws DBCreateTableException { public void createTable() throws DBCreateTableException {
createTable(TableSqlParser.createTable(tableName) createTable(TableSqlParser.createTable(tableName)
.column(columnUserID, Sql.INT).notNull() .column(columnUserID, Sql.INT).notNull()
.column(columnIP, Sql.varchar(20)).notNull() .column(columnIP, Sql.varchar(39)).notNull()
.column(columnGeolocation, Sql.varchar(50)).notNull() .column(columnGeolocation, Sql.varchar(50)).notNull()
.foreignKey(columnUserID, usersTable.getTableName(), usersTable.getColumnID()) .foreignKey(columnUserID, usersTable.getTableName(), usersTable.getColumnID())
.toString() .toString()