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-comments-0.1.8 db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.9 test/rails_root/db/migrate/20090730154102_allow_null_user.rb
muck-comments-0.1.9 db/migrate/20090730154102_allow_null_user.rb
muck-shares-0.1.0 test/rails_root/db/migrate/20090730154102_allow_null_user.rb