#2158 Remove unneeded SQLite migration of column length

- SQLite always returns a column length of 2,000,000 as they don't really have a column length restriction, cf. https://stackoverflow.com/questions/35413956/trying-to-get-the-column-size-of-a-column-using-jdbc-metadata
This commit is contained in:
ljacqu 2020-08-29 11:09:13 +02:00
parent 7bd3455427
commit e92721e597

View File

@ -45,9 +45,8 @@ class SqLiteMigrater {
* @return true if a migration is necessary, false otherwise
*/
static boolean isMigrationRequired(DatabaseMetaData metaData, String tableName, Columns col) throws SQLException {
return SqlDataSourceUtils.getColumnSize(metaData, tableName, col.TOTP_KEY) != 32
|| (SqlDataSourceUtils.isNotNullColumn(metaData, tableName, col.LAST_IP)
&& SqlDataSourceUtils.getColumnDefaultValue(metaData, tableName, col.LAST_IP) == null);
return SqlDataSourceUtils.isNotNullColumn(metaData, tableName, col.LAST_IP)
&& SqlDataSourceUtils.getColumnDefaultValue(metaData, tableName, col.LAST_IP) == null;
}
/**