Skip to content

Commit

Permalink
Add placeholder files in howto
Browse files Browse the repository at this point in the history
  • Loading branch information
SdgJlbl committed Feb 3, 2020
1 parent 79c5522 commit e008a6a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/howto/advanced-options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO This file will list advanced options for septentrion usage (eg using flags or env variables instead of a .ini file)
2 changes: 2 additions & 0 deletions docs/howto/configure.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Configure database connection settings
--------------------------------------

# TODO expand documentation on database connection

Ensure that your database connection settings are correctly configured.

- Either your environment variables `PGHOST`, `PGPORT` and `PGUSER` are properly set.
Expand Down
3 changes: 3 additions & 0 deletions docs/howto/file_naming.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
File naming convention
----------------------

# TODO explain the file naming convention
# The following extract was inspired by the DBA documentation.

We recommend to use the following naming convention for migration files:

.. code-block:: console
Expand Down
1 change: 1 addition & 0 deletions docs/howto/troubleshoot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO This file will contain help with the most common issues.
21 changes: 9 additions & 12 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ In this tutorial, we will use a configuration file, ``septentrion.ini``.

With the Docker setup described above, you should be good to go.
If you need additional configuration parameters to connect to your database, have a look at
:ref:`advanced configuration options <how-to/configure>`.
:ref:`advanced configuration options <howto/configure>`.


Write migrations
Expand Down Expand Up @@ -121,18 +121,14 @@ First, we want to visualize what is going to happen, without making any change t
[ ] 00-author.ddl.sql
# TODO add a schema_0.1.sql else septentrion is crashing
Great, we can now run it for real:

.. code-block:: console
$ septentrion --target-version 1.0 migrate
Loading schema
[X] Applied 0.1
Applying migrations
Version 0.1
Version 1.0
Expand All @@ -146,8 +142,8 @@ Great, we can now run it for real:
The ``--target-version`` flag is a required option (it might change in the future).


If something is not working as it should be, you probably want to check the :ref:`troubleshooting guide <how-to/troubleshoot>`
or the :ref:`advanced options <how-to/advanced-options>`.
If something is not working as it should be, you probably want to check the :ref:`troubleshooting guide <howto/troubleshoot>`
or the :ref:`advanced options <howto/advanced-options>`.

At this point, the ``author`` table has been created in the database. We can check that and simulate our application
by creating a few rows in the table.
Expand Down Expand Up @@ -186,9 +182,8 @@ by creating a few rows in the table.
More complex migrations
-----------------------
A more complex migration
------------------------

For version ``2.0`` of our application, we want to change ``birth_date`` from ``varchar`` to the ``date`` type.

Expand Down Expand Up @@ -216,7 +211,6 @@ We launch the migration.
$ septentrion --target-version 2.0 migrate
Applying migrations
Version 0.1
Version 1.0
[X] Already applied
Version 2.0
Expand All @@ -236,10 +230,13 @@ Now we can check that our migration successfully changed the column type in the
(3 rows)
Congratulations, you can now run migrations with *Septentrion*!

Going further
-------------

To continue with practical steps, head to the :ref:`How-to... <how-to>` section.
To continue with practical steps, head to the :ref:`How-to... <howto>` section.

If you want to better understand some design decisions, head to the :ref:`Discussions
<discussions>` sections.
Expand Down

0 comments on commit e008a6a

Please sign in to comment.