Skip to content

Privacy Detection MMDB sample has different schema than production database #12

@strobil

Description

@strobil

Description

The Privacy Detection sample MMDB file (privacy_detection_sample.mmdb) uses a different data type for boolean fields compared to the production database downloaded from IPinfo.

Problem

In the sample file, boolean fields (hosting, proxy, tor, relay, vpn) are stored as strings ("true" / "false").

In the production database, the same fields are stored as native booleans (true / false).

Reproduction

// Sample file - requires string type
type record struct {
    Hosting string `maxminddb:"hosting"` // works: Hosting="true"
}

// Production file - requires bool type  
type record struct {
    Hosting bool `maxminddb:"hosting"` // works: Hosting=true
}

Attempting to use bool type with the sample file results in:

maxminddb: cannot unmarshal true (string) into type bool

Attempting to use string type with the production file results in:

maxminddb: cannot unmarshal true (bool) into type string

Expected Behavior

Sample and production databases should have identical schemas to allow proper integration testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions