Renaming table in rails

Posted by Tommy on Stack Overflow See other posts from Stack Overflow or by Tommy
Published on 2011-01-08T00:44:35Z Indexed on 2011/01/08 0:53 UTC
Read the original article Hit count: 148

Filed under:

I want to rename a table... (any table.)

I tried this line of code:

ActiveRecord::ConnectionAdapters::SchemaStatements.rename_table(old_name, new_name)

Here's the weird thing. I know I got it working the first time, but now I get this error: undefined method `rename_table' for ActiveRecord::ConnectionAdapters::SchemaStatements:Module

Was there something I need to set? Or am I going blind here..

Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails