How do I delete a country by alpha-2 code?
Table of Contents
Delete a country by alpha-2 code via ores.cli. See the CLI inventory for sibling recipes.
Question
How do I delete a country by alpha-2 code using ores.cli?
Answer
Using .env
set -a && source .env && set +a ./ores.cli refdata countries delete \ --tenant "$ORES_TENANT" \ --key "XX"
Country deleted successfully: XX
With explicit db args
./ores.cli refdata countries delete \ --db-user ores_prime_origin_cli_user \ --db-password "$ORES_CLI_DB_PASSWORD" \ --db-database ores_dev_prime_origin \ --tenant "$ORES_TENANT" \ --key "XX"
Notes
Delete is a soft-delete: the row's valid_to is set to the current
timestamp rather than removing the row. The country will no longer appear
in list results but its history is preserved.