-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: can't quote Hash
when running transition table migration
#313
Comments
I have a suspicion that this might be adapted for how an older versions of
Rails works. I’ll check when I get a chance!
…On Fri, 9 Mar 2018 at 21:53, Ollie Haydon-Mulligan ***@***.***> wrote:
When I run rails g statesman:active_record_transition Order
OrderTransition, the migration created includes t.text :metadata,
default: {}. This line causes the migration to fail with the error TypeError:
can't quote Hash
Changing the line to t.json :metadata, default: {} allows the migration
to complete.
Seems the migration generator shouldn't be defaulting the column to type
text.
Rails 5.1.5
Statesman 3.4.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#313>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHFplY9kom0YiGDrt0dDA4iLh2nV8Khks5tcvnLgaJpZM4Sk690>
.
|
I saw the same issue here. Fixed it locally by quoting the empty hash: I'm on MySQL here, so we cannot opt for the json column type. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run
rails g statesman:active_record_transition Order OrderTransition
, the migration created includest.text :metadata, default: {}
. This line causes the migration to fail with the errorTypeError: can't quote Hash
Changing the line to
t.json :metadata, default: {}
allows the migration to complete.Seems the migration generator shouldn't be defaulting the column to type text.
Rails 5.1.5
Statesman 3.4.1
The text was updated successfully, but these errors were encountered: