Skip to content

Commit 2497eb0

Browse files
authored
Merge pull request rails#46516 from risinglf/fix-uuid-on-active-storage-guide
Add notice about primary_key_type in ActiveStorage migration guide [ci-skip]
2 parents 85edd85 + 2e4dc6a commit 2497eb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_storage_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ tables. Use `bin/rails db:migrate` to run the migration.
6262

6363
WARNING: `active_storage_attachments` is a polymorphic join table that stores your model's class name. If your model's class name changes, you will need to run a migration on this table to update the underlying `record_type` to your model's new class name.
6464

65-
WARNING: If you are using UUIDs instead of integers as the primary key on your models you will need to change the column type of `active_storage_attachments.record_id` and `active_storage_variant_records.id` in the generated migration accordingly.
65+
WARNING: If you are using UUIDs instead of integers as the primary key on your models you will need to change the column type of `active_storage_attachments.record_id` and `active_storage_variant_records.id` in the generated migration accordingly. This can be skipped if you set `Rails.application.config.generators { |g| g.orm :active_record, primary_key_type: :uuid }` in a config file.
6666

6767
Declare Active Storage services in `config/storage.yml`. For each service your
6868
application uses, provide a name and the requisite configuration. The example

0 commit comments

Comments
 (0)