Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Removes implication that files can be left in original location #2651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ So, assuming you want to leave the files in the exact same place, _this is
your migration_. Otherwise, see the next section first and modify the migration
to taste.

**NOTE**: While you can leave attachments in their original location in services like S3 because the files are identified by key (directory structures are simulated). In local environments (where directories are real) you must move files, as Active Storage does [not support custom paths](https://github.com/rails/rails/issues/32790). New attachments in S3 will not conserve your directory structure

```ruby
class ConvertToActiveStorage < ActiveRecord::Migration[5.2]
require 'open-uri'
Expand Down