title: Why is rails 5 adding nextval method in schema file?
body: <p>After upgrading to Rails 5 my schema file keeps getting altered when running db:migrate.  Rails is changing:</p>
  
  <pre><code>create_table "flightlessons", force: :cascade do |t|
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>create_table "flightlessons", id: :integer, default: -&gt; { "nextval('lessons_id_seq'::regclass)" }, force: :cascade do |t|
  </code></pre>
  
  <p>It only occurs on this one model.  Why is rails implementing nextval on this particular model?  And, why is it getting the model name wrong (lessons_id_seq should be flightlessons_id_seq).  Manually changing it to flightlessons_id_seq, however, results in the same no relation error.</p>
  
  <pre><code>PG::UndefinedTable: ERROR:  relation "lessons_id_seq" does not exist
  </code></pre>
  
  <p>To proceed, I simply alter the schema.rb file back to what that line 'should' be.  Then, I can migrate or test:prepare or whatever until the next time rails alters it back to using the nextval method.</p>
  
  <p>Thank you for any insight into this.</p>