Skip to content

Commit

Permalink
Clarified format of postgres_dsn (#7139)
Browse files Browse the repository at this point in the history
* Clarified format of postgres_dsn

* Update source/deploy/postgres-migration.rst

Co-authored-by: Ibrahim Serdar Acikgoz <[email protected]>

* Update source/deploy/postgres-migration.rst

Co-authored-by: Ibrahim Serdar Acikgoz <[email protected]>

* Update source/deploy/postgres-migration.rst

Co-authored-by: Ibrahim Serdar Acikgoz <[email protected]>

---------

Co-authored-by: Ibrahim Serdar Acikgoz <[email protected]>
  • Loading branch information
cwarnermm and isacikgoz authored May 16, 2024
1 parent e68af73 commit b6409bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/deploy/postgres-migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,13 @@ For our case, we can simply run the following command:

.. code:: sh
dbcmp --source "${MYSQL_DSN}" --target "${POSTGRES_DSN}" --exclude="db_migrations,ir_,focalboard,systems"
dbcmp --source "${MYSQL_DSN}" --target "${POSTGRES_DSN} " --exclude="db_migrations,ir_,focalboard,systems"
Note that this migration guide only covers the tables for Mattermost products.
An example command would look like: ``dbcmp --source "user:password@tcp(address:3306)/db_name --target "postgres://user:password@address:5432/db_name``

.. note::

``POSTGRES_DSN`` should start with a ``postgres://`` prefix. This way ``dbcmp`` decides which driver to use while connecting to a database.

Another exclusion we are making is in the ``db_migrations`` table which has a small difference (a typo in a single migration name) and creates a diff. Since we created the PostgreSQL schema with morph, and the official ``mattermost`` source, we can skip it safely without concerns. On the other hand, ``systems`` table may contain additional diffs if there were extra keys added during some of the migrations. Consider excluding the ``systems`` table if you run into issues, and perform a manual comparison as the data in the ``systems`` table is relatively smaller in size.

Expand Down
8 changes: 8 additions & 0 deletions source/images/creation-outline_F1C2B copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b6409bc

Please sign in to comment.