Skip to content

Commit b6409bc

Browse files
cwarnermmisacikgoz
andauthored
Clarified format of postgres_dsn (#7139)
* 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]>
1 parent e68af73 commit b6409bc

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

source/deploy/postgres-migration.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,13 @@ For our case, we can simply run the following command:
275275

276276
.. code:: sh
277277
278-
dbcmp --source "${MYSQL_DSN}" --target "${POSTGRES_DSN}" --exclude="db_migrations,ir_,focalboard,systems"
278+
dbcmp --source "${MYSQL_DSN}" --target "${POSTGRES_DSN} " --exclude="db_migrations,ir_,focalboard,systems"
279279
280-
Note that this migration guide only covers the tables for Mattermost products.
280+
An example command would look like: ``dbcmp --source "user:password@tcp(address:3306)/db_name --target "postgres://user:password@address:5432/db_name``
281+
282+
.. note::
283+
284+
``POSTGRES_DSN`` should start with a ``postgres://`` prefix. This way ``dbcmp`` decides which driver to use while connecting to a database.
281285

282286
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.
283287

Loading

0 commit comments

Comments
 (0)