Skip to content

Commit

Permalink
Document use of schema --migrations-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Éric Lemoine committed Mar 6, 2020
1 parent ee7c273 commit 94f5c42
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/howto/use_pum_for_migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ the Pum command to set the baseline:

.. code-block:: console
pum baseline --pg_service procrastinate --table public.pum --dir procrastinate/sql/migrations/ --baseline 0.5.0
pum baseline --pg_service procrastinate --table public.pum --dir $(procrastinate schema --migrations-path) --baseline 0.5.0
* ``--pg_service`` specifies the PostgreSQL Connection Service to use
* ``--table`` specifies the name of the Pum table to create and insert the baseline into
Expand All @@ -58,6 +58,12 @@ the Pum command to set the baseline:
not relevant here, yet mandatory)
* ``--baseline`` specifies the version number to use for the baseline

.. note::

The command ``procastinate schema --migrations-path`` is not available with
Procrastinate <= 0.5.0. So you'll have to find the path to the migrations directory
(``sql/migrations`` within the ``site-packages/procrastinate`` directory).

You're all set at this point! Procrastinate is ready to use, and your Pum baseline is
set for future migrations of the Procrastinate schema.

Expand All @@ -70,7 +76,7 @@ This is how migration scripts are applied using Pum:

.. code-block:: console
pum upgrade --pg_service procrastinate --table public.pum --dir procrastinate/sql/migrations/
pum upgrade --pg_service procrastinate --table public.pum --dir $(procrastinate schema --migrations-path)
The ``--pg_service``, ``--table``, and ``--dir`` flags have been described above, in the
context of the ``pum baseline`` command.
Expand Down

0 comments on commit 94f5c42

Please sign in to comment.