code: public static boolean hasGeometryColumn(final Database database,
           final String schemaName, final String tableName) {
        boolean isSpatialColumn = false;
        Statement jdbcStatement = null;
        try {
           if (geometryColumnsExists(database)) {
              final String query = "SELECT * FROM geometry_columns WHERE f_table_schema = '"
                    + (schemaName == null ? database.getDefaultSchemaName()
                          : schemaName)
                    + "' AND f_table_name = '"
                    + tableName
                    + "'";
              final DatabaseConnection databaseConnection = database
                    .getConnection();
              final JdbcConnection jdbcConnection = (JdbcConnection) databaseConnection;
              jdbcStatement = jdbcConnection.getUnderlyingConnection()
                    .createStatement();
              final ResultSet rs = jdbcStatement.executeQuery(query);
              isSpatialColumn = rs.next();
           }
        } catch (final SQLException e) {
           throw new UnexpectedLiquibaseException(
                 "Failed to determine if the table has a geometry column", e);
        } finally {
           if (jdbcStatement != null) {
              try {
                 jdbcStatement.close();
              } catch (final SQLException ignore) {
              }
           }
        }
        return isSpatialColumn;
     }
docs: Determines if the given table is in <code>GEOMETRY_COLUMNS</code> and,
  therefore, has a geometry column.
  
  @param database
  the database to query.
  @param schemaName
  the schema name.
  @param tableName
  the table name to check.
  @return <code>true</code> if the table has a geometry column.