Unverified Commit 2a8e01f3 authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Implement extension requirements support. (#400)

This option allows specifying which version of an extension to install on
the target database. The version might be different from the version on the
source, and in some cases installing the default version of an extension is
not desired. Examples are PostGIS v2 and v3 series, for instance.

A requirement file in JSON can be given to pgcopydb commands. The JSON file
should be an array of objects with the "name" and "version" keys, and can be
given to either of these commands:

    pgcopydb copy extensions --requirements requirements.json
    pgcopydb clone ... --requirements requirements.json

To list the available extension versions on the target database use the
following commands:

    pgcopydb list extension --available-versions
    pgcopydb list extension --available-versions --json

    pgcopydb list extension --requirements
    pgcopydb list extension --requirements --json

The last command will output all the extensions available on the target
database with their default version. It's then possible to edit the output
file and change the version numbers before giving it back to the copy and
clone commands.
parent 433d4cfe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment