ALTER TABLE login_identities
DROP CONSTRAINT IF EXISTS login_identities_identity_type_check;

ALTER TABLE login_identities
ADD CONSTRAINT login_identities_identity_type_check
CHECK (
  identity_type IN (
    'mobile',
    'wechat_mini_openid',
    'wechat_oa_openid',
    'wechat_unionid',
    'guest'
  )
);
