GitLab CE PG::UniqueViolation Error when Logging In

Hello, recently I downgraded to gitlab 14.3.2 CE. The login page appears, but when I tried to login. I got error 500

After checking the production_json.log, I got this error below.

{
   "method":"POST",
   "path":"/users/sign_in",
   "format":"html",
   "controller":"SessionsController",
   "action":"create",
   "status":500,
   "time":"2022-06-20T05:29:20.449Z",
   "params":[
      {
         "key":"authenticity_token",
         "value":"[FILTERED]"
      },
      {
         "key":"user",
         "value":{
            "remember_me":"0",
            "otp_attempt":"[FILTERED]"
         }
      }
   ],
   "remote_ip":"<ip>",
   "user_id":null,
   "username":null,
   "ua":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
   "redis_calls":2,
   "redis_duration_s":0.001518,
   "redis_read_bytes":393,
   "redis_write_bytes":308,
   "redis_cache_calls":1,
   "redis_cache_duration_s":0.000737,
   "redis_cache_read_bytes":203,
   "redis_cache_write_bytes":138,
   "redis_shared_state_calls":1,
   "redis_shared_state_duration_s":0.000781,
   "redis_shared_state_read_bytes":190,
   "redis_shared_state_write_bytes":170,
   "db_count":11,
   "db_write_count":6,
   "db_cached_count":0,
   "cpu_s":0.515757,
   "mem_objects":14417,
   "mem_bytes":1176971,
   "mem_mallocs":3235,
   "mem_total_bytes":1753651,
   "pid":62225,
   "queue_duration_s":0.040437,
   "correlation_id":"01G5ZSCDR9GN59K87PH98HPNAG",
   "cf_ray":"71e21b2b0d94879f-SIN",
   "exception.class":"ActiveRecord::RecordNotUnique",
   "exception.message":"PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"index_routes_on_path\"\nDETAIL:  Key (path)=(<user>) already exists.\n",
   "exception.backtrace":[
      "app/models/user.rb:1821:in `lock_access!'",
      "app/models/user.rb:1749:in `increment_failed_attempts!'",
      "app/controllers/concerns/authenticates_with_two_factor.rb:153:in `handle_two_factor_failure'",
      "app/controllers/concerns/authenticates_with_two_factor.rb:92:in `authenticate_with_two_factor_via_otp'",
      "app/controllers/concerns/authenticates_with_two_factor.rb:53:in `authenticate_with_two_factor'",
      "lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
      "lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
      "lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
      "lib/gitlab/metrics/web_transaction.rb:21:in `run'",
      "lib/gitlab/metrics/rack_middleware.rb:16:in `call'",
      "lib/gitlab/middleware/speedscope.rb:13:in `call'",
      "lib/gitlab/request_profiler/middleware.rb:17:in `call'",
      "lib/gitlab/jira/middleware.rb:19:in `call'",
      "lib/gitlab/middleware/go.rb:20:in `call'",
      "lib/gitlab/etag_caching/middleware.rb:21:in `call'",
      "lib/gitlab/middleware/multipart.rb:172:in `call'",
      "lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
      "lib/gitlab/middleware/read_only.rb:18:in `call'",
      "lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
      "lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
      "lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
      "lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
      "lib/gitlab/middleware/request_context.rb:21:in `call'",
      "config/initializers/fix_local_cache_middleware.rb:11:in `call'",
      "lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
      "lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'",
      "lib/gitlab/metrics/requests_rack_middleware.rb:74:in `call'",
      "lib/gitlab/middleware/release_env.rb:12:in `call'"
   ],
   "db_duration_s":0.03245,
   "view_duration_s":0.0,
   "duration_s":0.52339
}

I was wondering what’s the best course of action here. Thanks guys.