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-services-0.1.45 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.25 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.24 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.23 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.2.2 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.22 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.21 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.3.15 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-raker-0.3.14 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-services-0.1.44 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-services-0.1.43 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.2.1 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.2.0 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.20 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.1.11 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-contents-0.2.18 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.20 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.20 db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.1.9 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-oauth-0.1.8 test/rails_root/db/migrate/20090730154102_allow_null_user.rb