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-activities-3.2.2 test/db/migrate/20090730154102_allow_null_user.rb
muck-activities-3.2.1 test/db/migrate/20090730154102_allow_null_user.rb
muck-services-3.3.3 test/db/migrate/20090730154102_allow_null_user.rb
muck-commerce-3.0.1 test/db/migrate/20090730154102_allow_null_user.rb
muck-profiles-3.1.4 test/db/migrate/20090730154102_allow_null_user.rb
muck-auth-3.5.4 test/db/migrate/20090730154102_allow_null_user.rb
muck-auth-3.5.3 test/db/migrate/20090730154102_allow_null_user.rb
muck-profiles-3.1.3 test/db/migrate/20090730154102_allow_null_user.rb
muck-auth-3.5.2 test/db/migrate/20090730154102_allow_null_user.rb
muck-invites-3.4.1 test/db/migrate/20090730154102_allow_null_user.rb
muck-comments-3.2.0 db/migrate/20090730154102_allow_null_user.rb
muck-comments-3.1.0 db/migrate/20090730154102_allow_null_user.rb
muck-contents-3.0.2 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-profiles-3.0.2 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-services-0.1.47 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-groups-3.0.0 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-shares-3.0.1 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-services-3.0.0 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-profiles-3.0.1 test/rails_test/db/migrate/20090730154102_allow_null_user.rb
muck-contents-3.0.1 test/rails_test/db/migrate/20090730154102_allow_null_user.rb