# File lib/big_record/model.rb, line 465
    def validate_attributes_schema
      @attributes.keys.each do |key|
        value = read_attribute(key)
        next unless value
        # type validation
        if (column = column_for_attribute(key)) and !key.ends_with?(":")
          if column.collection?
            unless value.is_a?(Array)
              raise WrongAttributeDataType, "#{human_attribute_name(column.name)} has the wrong type. Expected collection of #{column.klass}. Record is #{value.class}"
            end
            value.each do |v|
              validate_attribute_type(v, column)
            end
          else
            validate_attribute_type(value, column)
          end
        else
          # Don't save attributes set in a previous schema version
          @attributes.delete(key)
        end
      end
    end