Skip to content

Commit 4ea968d

Browse files
committed
mode documentation
1 parent 5a65912 commit 4ea968d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/source/copydbforeignkey.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,28 @@ Prerequisites
1212

1313
Before migrating tables with foreign key constraints via copydb there are a couple of things to take care of
1414

15-
- Ghostferry needs to be ran with `SkipForeignKeyConstraintsCheck = true`, which will disable ghostferry to check foreign key
15+
- Ghostferry needs to be ran with ``SkipForeignKeyConstraintsCheck = true``, which will disable ghostferry to check foreign key
1616
constraints during initialization.
1717

18-
- Source DB should be read_only.
18+
- Source DB should be ``read_only``.
19+
20+
- Need to disable foreign key constraint checks on target DB by passing the following config to target db
21+
22+
.. code-block:: json
23+
24+
"Params": {
25+
"foreign_key_checks": "0"
26+
}
27+
28+
- Even though foreign key constraint checks are disabled on target db, table and db creation must happen in a specific order (eg parent should be created
29+
before child table). This creation order can be specified by passing ``TablesToBeCreatedFirst`` in the config, or else the table creation order will be
30+
figured out by copydb.
1931

2032
Limitations
2133
-------------
2234

2335
- While migrating tables with foreign key constraints the source db should be read_only as there are some fundamental issues when migrating tables with foreign key constraints at the same time when writes are occurring to the source database. This issue descibes briefly why the source database should be read_only during the migration - https://github.com/Shopify/katesql-migration-backend/issues/194.
2436

25-
- `Interrupt-Resume functionality` can be used as long as source database is read_only also during the interrupt period
37+
- ``Interrupt-Resume`` functionality can be used as long as source database is read_only also during the interrupt period
2638

27-
- `Inline Verifier` can be used as long as it is ensured that the source database is read_only (even during the interrupt period)
39+
- ``Inline Verifier`` can be used as long as it is ensured that the source database is read_only (even during the interrupt period)

0 commit comments

Comments
 (0)