We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, @ankane
First of all thank you for this really useful gem.
I've encountered an issue when adding a virtual column. Could you please take a look at the following?
My migration looks like this: add_column :my_table, :active, :boolean, as: "IF(finished_at IS NULL, 1, NULL)", stored: false
add_column :my_table, :active, :boolean, as: "IF(finished_at IS NULL, 1, NULL)", stored: false
When I run it the following error is printed in schema.rb
Could not dump table "my_table" because of following NoMethodError undefined method `quoted_scope' for #<StrongMigrations::WrappedConnection:
I've discovered that this method is called from mysql/schema_dumper via send
scope = @connection.send(:quoted_scope, table_name)
StrongMigrations::WrappedConnection uses delegate_missing_to :@connection which does not cover private methods so I was able to fix it by adding
StrongMigrations::WrappedConnection
delegate_missing_to :@connection
def quoted_scope(name = nil, type: nil) @connection.send(:quoted_scope, name, type: type) end
to it.
What do you think about this? Should I make a PR?
Thanks!
The text was updated successfully, but these errors were encountered:
9605653
Hi @ViktorKopychko, thanks for investigating and the detailed report! Fixed in the commit above.
Sorry, something went wrong.
@ankane that was quick, thanks a lot!
No branches or pull requests
Hi, @ankane
First of all thank you for this really useful gem.
I've encountered an issue when adding a virtual column.
Could you please take a look at the following?
My migration looks like this:
add_column :my_table, :active, :boolean, as: "IF(finished_at IS NULL, 1, NULL)", stored: false
When I run it the following error is printed in schema.rb
I've discovered that this method is called from mysql/schema_dumper via send
scope = @connection.send(:quoted_scope, table_name)
StrongMigrations::WrappedConnection
usesdelegate_missing_to :@connection
which does not cover private methods so I was able to fix it by addingto it.
What do you think about this? Should I make a PR?
Thanks!
The text was updated successfully, but these errors were encountered: