Sha256: 11b9b2af87010029647420659331e5fc0b606693de56d5dbb06436206a3abad5

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

class CreateUserNotifications < ActiveRecord::Migration
  def up
    create_table :user_notifications do |t|
      t.references :user
      t.references :project
      t.string :environment
      
      t.timestamps
    end
    
    User.unscoped do
      User.find_each(&:save_default_notifications)
    end
  end
  
  def down
    drop_table :user_notifications
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
houston-core-0.5.0.beta1 db/migrate/20120715230922_create_user_notifications.rb