migration

This commit is contained in:
danielgrippi 2011-05-17 19:04:39 -07:00
parent 2a449aa8c4
commit d516d0a0f8
2 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,15 @@
class DisablePasswordResetForAccountsWithoutUsernames < ActiveRecord::Migration
def self.up
execute <<SQL
UPDATE users
SET email = ""
WHERE username IS NULL
AND invitation_identifier IS NOT NULL
AND invitation_service = 'email'
SQL
end
def self.down
raise ActiveRecord::IrreversibleMigration.new
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110517180148) do
ActiveRecord::Schema.define(:version => 20110518010050) do
create_table "aspect_memberships", :force => true do |t|
t.integer "aspect_id", :null => false