title: Rails migration generates default timestamps (created_at, updated_at) as NULLABLE
body: <p>Some time ago we upgraded our application to <strong>Rails 4</strong> and switched to <strong>JRuby</strong>.</p>
  
  <p>Before that change migrations created the default timestamps as <em>NOT NULL</em>.
  After that change the <em>NOT NULL</em> is missing.</p>
  
  <p>We create these timestamps (created_at, updated_at) as follows:</p>
  
  <pre><code>class Model &lt; ActiveRecord::Migration
    def change
      create_table :model do |t|
        t.belongs_to :user, :null =&gt; false
  
        t.text :content
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>The important parts of our application are:</p>
  
  <ul>
  <li>ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.9'</li>
  <li>gem 'rails', '4.0.2'</li>
  <li>gem 'activerecord-jdbcpostgresql-adapter', '1.3.4'</li>
  <li>postgresql: stable 9.3.1</li>
  </ul>
  
  <p>Do you have any idea what might cause the problem and how we can change the default generation back to <em>NOT NULL</em>?</p>