-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Trouble creating the migration converting to Active Storage #2603
Comments
I am having this same error and I'm having trouble debugging. Edit: You may have some luck following this comment. I still am having a lot of errors but I actually don't need our old attachments so I'm just moving on! |
This is my workaround since I only have one model to migrate: Change NAME_OF_ATTACHMENT_TYPE per your app, ie: logo, etc. mine are just named attachment For Postgres use, LASTVAL() for Mariadb use LAST_INSERT_ID()
|
I ran into this as well since the example doesn't work for postgres. Here's a completed gist of a rake task with a few changes to ensure it would run with some spotty seed data. https://gist.github.com/colinpetruno/037de4fafa4cff695b1d7905cd6fd7c2 |
I've opened a PR for this: #2613 . |
I have this code, which I copied from the ActiveStorage migration guide:
And it's giving me this error when I attempt to migrate:
The text was updated successfully, but these errors were encountered: