Skip to content

civex collection

Manage collections (named containers for studies or investigations)

Command Description
add-schema Enable schemas on a collection, along with any parent schemas they need.
create Create a new collection.
delete Delete a collection and all its records to Recently Deleted.
graph Show the schema hierarchy for schemas present in a collection.
list List all collections.
purge Permanently delete a collection that's already in Recently Deleted. Irreversible.
restore Restore a soft-deleted collection (and the records cascade-deleted with it).
show Show a collection summary with record counts per schema.
update Update a collection's name, description, timezone, scope or schemas.

civex collection add-schema

Enable schemas on a collection, along with any parent schemas they need.

A collection only holds records of the schemas it is enabled for.

Usage

civex collection add-schema NAME SCHEMAS...

Arguments

Argument Type Required Description
NAME str yes Collection name
SCHEMAS... str yes Schema name(s) to enable

civex collection create

Create a new collection.

Usage

civex collection create [OPTIONS] NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

Options

Option Type Default Description
--description, -d str Collection description
--timezone, --tz str IANA timezone such as America/Chicago. Datetime values without a UTC offset are read in this zone, and the web UI shows them in it.
--scope str local 'local' (default): records here can only be referenced from this collection. 'global': records here can be referenced from every collection, for shared reference data such as species or sites.
--schema, -s str A schema the collection is for; repeat for several. Records here can only be of these schemas. A child schema needs its parent listed too.

civex collection delete

Delete a collection and all its records to Recently Deleted.

Reversible with civex collection restore within the retention window (see civex trash list); civex collection purge deletes permanently.

Usage

civex collection delete [OPTIONS] NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

Options

Option Type Default Description
--yes, -y flag false Skip confirmation prompt

civex collection graph

Show the schema hierarchy for schemas present in a collection.

Usage

civex collection graph NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

civex collection list

List all collections.

Usage

civex collection list

civex collection purge

Permanently delete a collection that's already in Recently Deleted. Irreversible.

Usage

civex collection purge [OPTIONS] NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

Options

Option Type Default Description
--yes, -y flag false Skip confirmation prompt

civex collection restore

Restore a soft-deleted collection (and the records cascade-deleted with it).

Usage

civex collection restore NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

civex collection show

Show a collection summary with record counts per schema.

Usage

civex collection show NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

civex collection update

Update a collection's name, description, timezone, scope or schemas.

Usage

civex collection update [OPTIONS] NAME

Arguments

Argument Type Required Description
NAME str yes Collection name

Options

Option Type Default Description
--rename str New name for the collection
--description, -d str New description for the collection
--timezone, --tz str New IANA timezone for datetime values, such as America/Chicago. Pass an empty string to clear it. Stored values are not changed.
--scope str 'local' or 'global'. A global collection that other collections reference can't be made local.
--schema, -s str Replace the collection's schema list; repeat for several. A schema that still has records here can't be removed.