Ignoring schemas when downloading

pgCodeKeeper has a feature of a selective downloading of objects from the database. To download the content of specific database schemas, you should select them on the list of ignored schemas.

List of ignored schemas is a list of schemas and their content that shouldn’t or should be downloaded from the DB.

There are two types of lists of ignored schemas:

black list

allows displaying of all the objects except the ones from the specified schemas and the schemas themselves in the list rules;

white list

as opposed to the black list, it forbids displaying of all the objects except the ones from the specified schemas and the schemas themselves in the list rules.

In each project, it is possible to create an ignored objects list, applying only to current project. To do this, create the .pgcodekeeperignoreschema file in the project root and fill it with the rules according to the list syntax.

Attention

The .pgcodekeeperignoreschema file format is case-sensitive. You should use UTF-8.

For the .pgcodekeeperignoreschema file, the same rules are applied, as for Ignore List (see the List syntax section).

We can apply the list of ignored schemas in DB storage. CLI version pgCodeKeeper with the help of the following command: pgcodekeeper-cli --ignore-schema <path> SOURCE DEST.

Object selection

If you tick Pattern(REGEX) in the new rule creation window, objects will be searched by a regular expression specified in the object name field. ignore-schema

Example of using the ignoring of schemas in downloading

For instance, we need to download all the database objects, except for the objects from the worker schema. Add worker to the list of the ignored schemas, tick Black-list on the interface of the ignored schemas:

black_list_2

Click Apply and Close.

In the project editor, click Changes refresh. There are no objects from the worker schema on the differences panel!

black_list_worker

If you need to download the objects from the worker schema only, tick White-list in the ignored schemas interface. As a result, only the objects from the worker schema will be displayed.

white_list_worker