Commit 04f05ac1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Check for table instead of class

parent f64db1fa
......@@ -17,7 +17,7 @@ class FixIdentities < ActiveRecord::Migration
# Update legacy identities
execute "UPDATE identities SET provider = '#{new_provider}' WHERE provider = 'ldap';"
if defined?(LdapGroupLink)
if table_exists?('ldap_group_links')
execute "UPDATE ldap_group_links SET provider = '#{new_provider}' WHERE provider IS NULL;"
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment