Tools to obtain latest versions of country codes from ISO's Online Browsing Platform (OBP). Hosted at http://country-codes.shihan.dev/
datasette install datasette-auth-github
datasette plugins
[
{
"name": "datasette-auth-github",
"static": false,
"templates": true,
"version": "0.13.1",
"hooks": [
"menu_links",
"register_routes"
]
}
]
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
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
.
Example of rolling back one step:
migrate -source file://./db/migrations -database "sqlite3://./country_code.db" down 1