country-codes

command module
v0.0.0-...-0d47d07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 11 Imported by: 0

README

country-codes

Tools to obtain latest versions of country codes from ISO's Online Browsing Platform (OBP). Hosted at http://country-codes.shihan.dev/

Screenshot

Development note

Datasette plugins
Install
datasette install datasette-auth-github
Installed
datasette plugins
[
    {
        "name": "datasette-auth-github",
        "static": false,
        "templates": true,
        "version": "0.13.1",
        "hooks": [
            "menu_links",
            "register_routes"
        ]
    }
]
Migration

We use migration to manage schema migration of our SQLite3 DB. The tool needs to be installed with sqlite3 tag so that it can support SQLite3.

go install -tags "sqlite3" github.com/golang-migrate/migrate/v4/cmd/migrate
How to generate migration files

Migration files can be found in db/migrations/.

cd db/migrations/
migrate create -ext sql <FILENAME BASE>

Migrations are applied by the app internally, so we do not need to run migrate up.

How to rollback a migration

Example of rolling back one step:

migrate -source file://./db/migrations -database "sqlite3://./country_code.db" down 1

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL