1 class TimestampsNotNull < ActiveRecord::Migration
3 ActiveRecord::Base.connection.tables.each do |t|
4 next if t == 'schema_migrations'
5 change_column t.to_sym, :created_at, :datetime, :null => false
6 change_column t.to_sym, :updated_at, :datetime, :null => false
10 # There might have been a NULL constraint before this, depending
11 # on the version of Rails used to build the database.