debshots/db/migrate/20170422181908_change_users_default_provider_local.rb

7 lines
277 B
Ruby

# Previous local accounts have NULL as its value for the 'provider'.
# Turn that into an explicit 'local' string.
class ChangeUsersDefaultProviderLocal < ActiveRecord::Migration[5.0]
def change
execute "update users set provider='local' where provider is null"
end
end