title: Step on how to add devise migration to existing User model in ruby on rails?
body: <p>I have a User model created already. I am wondering how should I configure devise with my existing User model. That being said, do I need to setup any additional routes or make atttributes accessible in my user method. </p>
  
  <p>So far user model is</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    attr_accessible :email, :pic, :name, :username
    has_many :topics
  end
  </code></pre>
  
  <p>My migration for CreateUsers</p>
  
  <pre><code>class CreateUsers &lt; ActiveRecord::Migration
    def change
      create_table :users do |t|
        t.string :name
        t.string :email
        t.string :username
        t.string :pic
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>Now what I plan to do is run</p>
  
  <pre><code>rails g migration AddDeviseColumnsToUser
  </code></pre>
  
  <p>And add this to my migration file</p>
  
  <pre><code>class AddDeviseColumnsToUser &lt; ActiveRecord::Migration
    def change
      change_table :users do |t|
        t.string :encrypted_password, :null =&gt; false, :default =&gt; '', :limit =&gt; 128
        t.confirmable
        t.recoverable
        t.rememberable
        t.trackable
        t.token_authenticatable
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>Now I am wondering how should I setup my routes or do I have to ? And what attributes should be made accessible in my User model?</p>
  
  <p>Update: I have already installed Devise and configured it with</p>
  
  <pre><code>rails generate devise:install
  </code></pre>