Sha256: 96069dd10bfbcd26d4ccb273619b6987d641dbf06f27cf4102a2779aeb331fef

Contents?: true

Size: 252 Bytes

Versions: 224

Compression:

Stored size: 252 Bytes

Contents

class AllowNullUser < ActiveRecord::Migration
  def self.up
    change_column :comments, :user_id, :integer, :null => true, :default => nil
  end

  def self.down
    change_column :comments, :user_id, :integer, :null => false, :default => 0
  end
end

Version data entries

224 entries across 206 versions & 12 rubygems

Version Path
muck-raker-0.1.41 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.40 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.39 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-shares-0.1.6 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.1.6 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.12 db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.12 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.38 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-shares-0.1.5 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.37 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.36 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.35 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.1.5 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.11 db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.11 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-shares-0.1.4 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.32 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.33 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.31 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.1.30 test/rails_root/db/migrate/20090730154102_allow_null_user.rb