Skip to content

Commit 17f5a8c

Browse files
committed
Add schema_dump docs to the multiple databases docs [skip ci]
1 parent 16ff9af commit 17f5a8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

guides/source/active_record_multiple_databases.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ Lastly, for new writer databases, you need to set the `migrations_paths` to the
102102
where you will store migrations for that database. We'll look more at `migrations_paths`
103103
later on in this guide.
104104

105+
You can also configure the schema dump file by setting `schema_dump` to a custom schema file name
106+
or completely skip the schema dumping by setting `schema_dump: false`.
107+
105108
Now that we have a new database, let's set up the connection model. In order to use the
106109
new database we need to create a new abstract class and connect to the animals databases.
107110

@@ -443,7 +446,7 @@ class ShardRecord < ApplicationRecord
443446
end
444447
```
445448

446-
If you're using shards, make sure to set the `migrations_paths` to the same path for
449+
If you're using shards, make sure both `migrations_paths` and `schema_dump` remain unchanged for
447450
all the shards. When generating a migration you can pass the `--database` option and
448451
use one of the shard names. Since they all set the same path, it doesn't matter which
449452
one you choose.

0 commit comments

Comments
 (0)