It's simple: I want to remove NOT NULL from the field, create a migration, ala

class Remove5NullFromUsers < ActiveRecord::Migration def change change_column :users, :email, :string, :null => true, :default => '' end end 

This is a devise tablet, as a result, an error:

 undefined method `to_sym' for nil:NilClass/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/schema_definitions.rb:216:in `column' 

I already broke my head, I can not understand what I am doing wrong? thank

  • SQLite does not support changing columns. You can look at the source of the error here , I suspect that the problem is in the tricky SQLite types, and instead of the type it returns just nil . However, you cannot make the modify column when working with SQLite. - etki
  • Can you please more about the modify column? Is this done in migration? - Godfather
  • This is what change_column trying to do. - etki
  • one
    Thank! I read. Write it as an answer - offset;) - Godfather

1 answer 1

I support the previous ones. Itself recently migrated from SQLite to Postgres precisely because of similar problems (with migrations). Better go to postgres, and there is a heme to transfer the base.

Manual in Habré: Transfer data from one database to any other