Skip to content

Commit

Permalink
Add details about adding LPCONFIG env variable when running scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ineesalmeida committed Oct 8, 2024
1 parent 48db285 commit 068ab61
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions how-to/apply-schema-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@ please run the following command:
.. code-block:: bash
make -C database/schema test
If you only want to apply one specific patch for testing purposes, you can
run the following command:

.. code-block: bash
psql launchpad_dev -1 -f <your-patch>.sql
This comment will apply file (``-f``) ``<your-patch>.sql`` as a single
transaction (``-1``) to the database named ``launchpad_dev``.
10 changes: 10 additions & 0 deletions how-to/manage-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ In our example:
.. code::
/srv/launchpad/code/utilities/anoint-team-member test-user admins
.. note::

Note that for running some of these scripts, it is common to need to add a
``LPCONFIG=launchpad-admin`` at the start of the command to set the needed
evironmental variable. This is not necessary here because it is already
set in the environment within the ``launchpad-admin`` unit.
Running this command in another unit (for example, ``launchpad-scripts``)
would require running as ``LPCONFIG=launchpad-admin
/srv/launchpad/code/utilities/anoint-team-member <username> <team-name>``.

0 comments on commit 068ab61

Please sign in to comment.