> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/engineering-reference/db/tables/std_countries.md).

# std\_countries

{% hint style="info" %}
Generated from the staging database schema, with descriptions drafted by agents ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/db/tables/std_countries.md).
{% endhint %}

## Description

Reference list of countries: ISO codes, English names, continent, Stripe tax ID type and a blacklist flag.

<details>

<summary><strong>Table Definition</strong></summary>

```sql
CREATE TABLE `std_countries` (
  `code` char(2) NOT NULL COMMENT 'Two-letter country code (ISO 3166-1 alpha-2)',
  `name` varchar(255) NOT NULL COMMENT 'English country name',
  `full_name` varchar(255) NOT NULL COMMENT 'Full English country name',
  `iso3` char(3) NOT NULL COMMENT 'Three-letter country code (ISO 3166-1 alpha-3)',
  `number` char(3) NOT NULL COMMENT 'Three-digit country number (ISO 3166-1 numeric)',
  `continent_code` char(2) NOT NULL,
  `stripe_vat_enum` varchar(255) DEFAULT NULL COMMENT 'Stripe specific id',
  `blacklisted` tinyint DEFAULT '0',
  `notes` varchar(5000) DEFAULT NULL,
  PRIMARY KEY (`code`),
  KEY `continent_code` (`continent_code`),
  CONSTRAINT `fk_countries_continents` FOREIGN KEY (`continent_code`) REFERENCES `std_continents` (`code`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
```

</details>

## Columns

| Name              | Type          | Default | Nullable | Parents                                                                                       | Comment                                                                          |
| ----------------- | ------------- | ------- | -------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| code              | char(2)       |         | false    |                                                                                               | Two-letter country code (ISO 3166-1 alpha-2)                                     |
| name              | varchar(255)  |         | false    |                                                                                               | English country name                                                             |
| full\_name        | varchar(255)  |         | false    |                                                                                               | Full English country name                                                        |
| iso3              | char(3)       |         | false    |                                                                                               | Three-letter country code (ISO 3166-1 alpha-3)                                   |
| number            | char(3)       |         | false    |                                                                                               | Three-digit country number (ISO 3166-1 numeric)                                  |
| continent\_code   | char(2)       |         | false    | [std\_continents](https://docs.snapfix.com/engineering-reference/db/tables/std_continents.md) |                                                                                  |
| stripe\_vat\_enum | varchar(255)  |         | true     |                                                                                               | Stripe tax ID type of the country, for example gb\_vat for the UK.               |
| blacklisted       | tinyint       | 0       | true     |                                                                                               | 1 = authpy's IP check blocks requests from this country; 0 on every staging row. |
| notes             | varchar(5000) |         | true     |                                                                                               |                                                                                  |

## Viewpoints

| Name                                                                                  | Definition                                                                                                                                    |
| ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [reference](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-22.md) | Code lists and standard data: the enum tables, countries, currencies, industry codes, defaults the apps download, and the API endpoint lists. |

## Constraints

| Name                      | Type        | Definition                                                      |
| ------------------------- | ----------- | --------------------------------------------------------------- |
| fk\_countries\_continents | FOREIGN KEY | FOREIGN KEY (continent\_code) REFERENCES std\_continents (code) |
| PRIMARY                   | PRIMARY KEY | PRIMARY KEY (code)                                              |

## Indexes

| Name            | Definition                                        |
| --------------- | ------------------------------------------------- |
| continent\_code | KEY continent\_code (continent\_code) USING BTREE |
| PRIMARY         | PRIMARY KEY (code) USING BTREE                    |

## Relations

```mermaid
erDiagram

"std_countries" }o--|| "std_continents" : "FOREIGN KEY (continent_code) REFERENCES std_continents (code)"

"std_countries" {
  char_2_ code PK
  char_2_ continent_code FK
}
"std_continents" {
  char_2_ code PK
}
```

***

> Generated by [tbls](https://github.com/k1LoW/tbls)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/engineering-reference/db/tables/std_countries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
