diff --git a/Gemfile b/Gemfile
index bf2549e36db20c991a787caf7df06bf03a6d9356..60610a767c844961814add11e95f85f14785dd28 100644
--- a/Gemfile
+++ b/Gemfile
@@ -179,4 +179,4 @@ gem 'acts_as_list'
 
 gem 'faraday-net_http_persistent', '~> 2.0'
 
-gem 'elasticsearch'
+gem 'elasticsearch', '< 7.14'
diff --git a/Gemfile.lock b/Gemfile.lock
index fa48df2baec286a61ab54c658765c27dc9372390..1b2095412db1cce0a600cfd3520d218f763587cd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -12,101 +12,107 @@ GIT
 
 GIT
   remote: https://github.com/kreeti/kt-paperclip.git
-  revision: ab1016d77336a8d7b9db72eb29b6bd19af4027fc
+  revision: 7f73b7442743f57fb957b4bb54c1bca11ddd1c72
   branch: master
   specs:
-    kt-paperclip (6.4.1)
+    kt-paperclip (7.1.1)
       activemodel (>= 4.2.0)
       activesupport (>= 4.2.0)
+      marcel (~> 1.0.1)
       mime-types
-      mimemagic (~> 0.3.0)
       terrapin (~> 0.6.0)
 
 GIT
   remote: https://github.com/lynndylanhurley/devise_token_auth.git
-  revision: 4c5245b88b39c1bb305e0cbdbfc2513eebdeda93
+  revision: 8f44a8c66fd772b2d33be4ba187c0b1a47caba2a
   branch: master
   specs:
     devise_token_auth (1.2.0)
       bcrypt (~> 3.0)
       devise (> 3.5.2, < 5)
-      rails (>= 4.2.0, < 6.2)
+      rails (>= 4.2.0, < 7.1)
 
 GEM
   remote: https://rubygems.org/
   specs:
-    actioncable (6.1.4)
-      actionpack (= 6.1.4)
-      activesupport (= 6.1.4)
+    actioncable (7.0.3)
+      actionpack (= 7.0.3)
+      activesupport (= 7.0.3)
       nio4r (~> 2.0)
       websocket-driver (>= 0.6.1)
-    actionmailbox (6.1.4)
-      actionpack (= 6.1.4)
-      activejob (= 6.1.4)
-      activerecord (= 6.1.4)
-      activestorage (= 6.1.4)
-      activesupport (= 6.1.4)
+    actionmailbox (7.0.3)
+      actionpack (= 7.0.3)
+      activejob (= 7.0.3)
+      activerecord (= 7.0.3)
+      activestorage (= 7.0.3)
+      activesupport (= 7.0.3)
       mail (>= 2.7.1)
-    actionmailer (6.1.4)
-      actionpack (= 6.1.4)
-      actionview (= 6.1.4)
-      activejob (= 6.1.4)
-      activesupport (= 6.1.4)
+      net-imap
+      net-pop
+      net-smtp
+    actionmailer (7.0.3)
+      actionpack (= 7.0.3)
+      actionview (= 7.0.3)
+      activejob (= 7.0.3)
+      activesupport (= 7.0.3)
       mail (~> 2.5, >= 2.5.4)
+      net-imap
+      net-pop
+      net-smtp
       rails-dom-testing (~> 2.0)
-    actionpack (6.1.4)
-      actionview (= 6.1.4)
-      activesupport (= 6.1.4)
-      rack (~> 2.0, >= 2.0.9)
+    actionpack (7.0.3)
+      actionview (= 7.0.3)
+      activesupport (= 7.0.3)
+      rack (~> 2.0, >= 2.2.0)
       rack-test (>= 0.6.3)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.2.0)
-    actiontext (6.1.4)
-      actionpack (= 6.1.4)
-      activerecord (= 6.1.4)
-      activestorage (= 6.1.4)
-      activesupport (= 6.1.4)
+    actiontext (7.0.3)
+      actionpack (= 7.0.3)
+      activerecord (= 7.0.3)
+      activestorage (= 7.0.3)
+      activesupport (= 7.0.3)
+      globalid (>= 0.6.0)
       nokogiri (>= 1.8.5)
-    actionview (6.1.4)
-      activesupport (= 6.1.4)
+    actionview (7.0.3)
+      activesupport (= 7.0.3)
       builder (~> 3.1)
       erubi (~> 1.4)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.1, >= 1.2.0)
-    active_model_serializers (0.10.12)
-      actionpack (>= 4.1, < 6.2)
-      activemodel (>= 4.1, < 6.2)
+    active_model_serializers (0.10.13)
+      actionpack (>= 4.1, < 7.1)
+      activemodel (>= 4.1, < 7.1)
       case_transform (>= 0.2)
       jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
-    activejob (6.1.4)
-      activesupport (= 6.1.4)
+    activejob (7.0.3)
+      activesupport (= 7.0.3)
       globalid (>= 0.3.6)
-    activemodel (6.1.4)
-      activesupport (= 6.1.4)
-    activerecord (6.1.4)
-      activemodel (= 6.1.4)
-      activesupport (= 6.1.4)
-    activerecord-import (1.1.0)
-      activerecord (>= 3.2)
-    activestorage (6.1.4)
-      actionpack (= 6.1.4)
-      activejob (= 6.1.4)
-      activerecord (= 6.1.4)
-      activesupport (= 6.1.4)
-      marcel (~> 1.0.0)
+    activemodel (7.0.3)
+      activesupport (= 7.0.3)
+    activerecord (7.0.3)
+      activemodel (= 7.0.3)
+      activesupport (= 7.0.3)
+    activerecord-import (1.4.0)
+      activerecord (>= 4.2)
+    activestorage (7.0.3)
+      actionpack (= 7.0.3)
+      activejob (= 7.0.3)
+      activerecord (= 7.0.3)
+      activesupport (= 7.0.3)
+      marcel (~> 1.0)
       mini_mime (>= 1.1.0)
-    activesupport (6.1.4)
+    activesupport (7.0.3)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
       tzinfo (~> 2.0)
-      zeitwerk (~> 2.3)
     acts_as_list (1.0.4)
       activerecord (>= 4.2)
-    addressable (2.7.0)
+    addressable (2.8.0)
       public_suffix (>= 2.0.2, < 5.0)
-    annotate (3.1.1)
-      activerecord (>= 3.2, < 7.0)
+    annotate (3.2.0)
+      activerecord (>= 3.2, < 8.0)
       rake (>= 10.4, < 14.0)
     ansi (1.5.0)
     ast (2.4.2)
@@ -114,16 +120,16 @@ GEM
       descendants_tracker (~> 0.0.4)
       ice_nine (~> 0.11.0)
       thread_safe (~> 0.3, >= 0.3.1)
-    bcrypt (3.1.16)
-    benchmark-ips (2.9.1)
+    bcrypt (3.1.18)
+    benchmark-ips (2.10.0)
     better_errors (2.8.3)
       coderay (>= 1.0.0)
       erubi (>= 1.0.0)
       rack (>= 0.9.0)
     bindex (0.8.1)
-    brakeman (5.0.1)
+    brakeman (5.2.3)
     builder (3.2.4)
-    bullet (6.1.4)
+    bullet (7.0.2)
       activesupport (>= 3.0.0)
       uniform_notifier (~> 1.11)
     byebug (11.1.3)
@@ -135,12 +141,12 @@ GEM
     coderay (1.1.3)
     coercible (1.0.0)
       descendants_tracker (~> 0.0.1)
-    concurrent-ruby (1.1.9)
+    concurrent-ruby (1.1.10)
     connection_pool (2.2.5)
     crass (1.0.6)
-    curb (0.9.11)
+    curb (1.0.1)
     cvss (0.99.0)
-    dalli (2.7.11)
+    dalli (3.2.2)
     database_cleaner (2.0.1)
       database_cleaner-active_record (~> 2.0.0)
     database_cleaner-active_record (2.0.1)
@@ -157,8 +163,8 @@ GEM
       sqlite3
       sys-uname
       terminal-table
-    dead_end (1.1.7)
-    derailed_benchmarks (2.1.0)
+    dead_end (4.0.0)
+    derailed_benchmarks (2.1.1)
       benchmark-ips (~> 2)
       dead_end
       get_process_mem (~> 0)
@@ -172,254 +178,282 @@ GEM
       thor (>= 0.19, < 2)
     descendants_tracker (0.0.4)
       thread_safe (~> 0.3, >= 0.3.1)
-    devise (4.8.0)
+    devise (4.8.1)
       bcrypt (~> 3.0)
       orm_adapter (~> 0.1)
       railties (>= 4.1.0)
       responders
       warden (~> 1.2.3)
-    diff-lcs (1.4.4)
+    diff-lcs (1.5.0)
+    digest (3.1.0)
     docile (1.4.0)
-    elasticsearch (7.13.0)
-      elasticsearch-api (= 7.13.0)
-      elasticsearch-transport (= 7.13.0)
-    elasticsearch-api (7.13.0)
+    elasticsearch (7.13.3)
+      elasticsearch-api (= 7.13.3)
+      elasticsearch-transport (= 7.13.3)
+    elasticsearch-api (7.13.3)
       multi_json
-    elasticsearch-transport (7.13.0)
+    elasticsearch-transport (7.13.3)
       faraday (~> 1)
       multi_json
     equalizer (0.0.11)
     erubi (1.10.0)
-    erubis (2.7.0)
     execjs (2.8.1)
-    factory_bot (6.2.0)
+    factory_bot (6.2.1)
       activesupport (>= 5.0.0)
     factory_bot_rails (6.2.0)
       factory_bot (~> 6.2.0)
       railties (>= 5.0.0)
-    faker (2.18.0)
-      i18n (>= 1.6, < 2)
-    faraday (1.4.2)
+    faker (2.21.0)
+      i18n (>= 1.8.11, < 2)
+    faraday (1.9.0)
       faraday-em_http (~> 1.0)
       faraday-em_synchrony (~> 1.0)
       faraday-excon (~> 1.1)
-      faraday-net_http (~> 1.0)
-      faraday-net_http_persistent (~> 1.1)
-      multipart-post (>= 1.2, < 3)
+      faraday-httpclient (< 3)
+      faraday-multipart (~> 1.0)
+      faraday-net_http (< 3)
+      faraday-net_http_persistent (< 3)
+      faraday-patron (< 3)
+      faraday-rack (~> 1.0)
+      faraday-retry (~> 1.0)
       ruby2_keywords (>= 0.0.4)
     faraday-em_http (1.0.0)
     faraday-em_synchrony (1.0.0)
     faraday-excon (1.1.0)
-    faraday-net_http (1.0.1)
-    faraday-net_http_persistent (1.1.0)
+    faraday-httpclient (2.0.1)
+      httpclient (>= 2.2)
+    faraday-multipart (1.0.4)
+      multipart-post (~> 2)
+    faraday-net_http (2.0.3)
+    faraday-net_http_persistent (2.0.1)
+      faraday-net_http
+      net-http-persistent (~> 4.0)
+    faraday-patron (2.0.1)
+      patron (>= 0.4.2)
+    faraday-rack (1.0.0)
+    faraday-retry (1.0.3)
     feature (1.4.0)
-    ffi (1.15.1)
-    ffi-libarchive (1.0.17)
+    ffi (1.15.5)
+    ffi-libarchive (1.1.3)
       ffi (~> 1.0)
     flamegraph (0.9.5)
-    flay (2.12.1)
-      erubis (~> 2.7.0)
+    flay (2.13.0)
+      erubi (~> 1.10)
       path_expander (~> 1.0)
       ruby_parser (~> 3.0)
       sexp_processor (~> 4.0)
-    flog (4.6.4)
+    flog (4.6.5)
       path_expander (~> 1.0)
       ruby_parser (~> 3.1, > 3.1.0)
       sexp_processor (~> 4.8)
     get_process_mem (0.2.7)
       ffi (~> 1.0)
-    gitlab (4.17.0)
+    gitlab (4.18.0)
       httparty (~> 0.18)
-      terminal-table (~> 1.5, >= 1.5.1)
-    globalid (0.5.1)
+      terminal-table (>= 1.5.1)
+    globalid (1.0.0)
       activesupport (>= 5.0)
-    haml (5.2.1)
+    haml (5.2.2)
       temple (>= 0.8.0)
       tilt
-    hashie (4.1.0)
+    hashie (5.0.0)
     heapy (0.2.0)
       thor
-    httparty (0.18.1)
+    httparty (0.20.0)
       mime-types (~> 3.0)
       multi_xml (>= 0.5.2)
-    i18n (1.8.10)
+    httpclient (2.8.3)
+    i18n (1.10.0)
       concurrent-ruby (~> 1.0)
     ice_nine (0.11.2)
     immigrant (0.3.6)
       activerecord (>= 3.0)
-    json (2.5.1)
+    json (2.6.2)
     jsonapi-renderer (0.2.2)
     justify (1.0.2)
-    jwt (2.2.3)
+    jwt (2.4.1)
     kwalify (0.7.2)
     launchy (2.5.0)
       addressable (~> 2.7)
     logger-colors (1.0.0)
-    loofah (2.10.0)
+    loofah (2.18.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
       mini_mime (>= 0.1.1)
-    marcel (1.0.1)
+    marcel (1.0.2)
     memory_profiler (1.0.0)
     method_source (1.0.0)
-    mime-types (3.3.1)
+    mime-types (3.4.1)
       mime-types-data (~> 3.2015)
-    mime-types-data (3.2021.0225)
-    mimemagic (0.3.10)
+    mime-types-data (3.2022.0105)
+    mimemagic (0.4.3)
       nokogiri (~> 1)
       rake
-    mina (1.2.3)
+    mina (1.2.4)
       open4 (~> 1.3.4)
       rake
     mini_histogram (0.3.1)
-    mini_mime (1.1.0)
-    mini_portile2 (2.5.3)
-    minitest (5.14.4)
-    minitest-reporters (1.4.3)
+    mini_mime (1.1.2)
+    minitest (5.16.1)
+    minitest-reporters (1.5.0)
       ansi
       builder
       minitest (>= 5.0)
       ruby-progressbar
     multi_json (1.15.0)
     multi_xml (0.6.0)
-    multipart-post (2.1.1)
+    multipart-post (2.2.3)
     mustache (1.1.1)
     mustermann (1.1.1)
       ruby2_keywords (~> 0.0.1)
     net-http-persistent (4.0.1)
       connection_pool (~> 2.2)
-    nio4r (2.5.7)
-    nokogiri (1.11.7)
-      mini_portile2 (~> 2.5.0)
+    net-imap (0.2.3)
+      digest
+      net-protocol
+      strscan
+    net-pop (0.1.1)
+      digest
+      net-protocol
+      timeout
+    net-protocol (0.1.3)
+      timeout
+    net-smtp (0.3.1)
+      digest
+      net-protocol
+      timeout
+    nio4r (2.5.8)
+    nokogiri (1.13.6-x86_64-linux)
       racc (~> 1.4)
-    oauth (0.5.6)
-    oauth2 (1.4.7)
-      faraday (>= 0.8, < 2.0)
+    oauth (0.5.10)
+    oauth2 (1.4.9)
+      faraday (>= 0.17.3, < 3.0)
       jwt (>= 1.0, < 3.0)
       multi_json (~> 1.3)
       multi_xml (~> 0.5)
       rack (>= 1.2, < 3)
-    omniauth (2.0.4)
+    omniauth (1.9.1)
       hashie (>= 3.4.6)
       rack (>= 1.6.2, < 3)
-      rack-protection
-    omniauth-facebook (8.0.0)
+    omniauth-facebook (9.0.0)
       omniauth-oauth2 (~> 1.2)
-    omniauth-google-oauth2 (1.0.0)
+    omniauth-google-oauth2 (0.8.2)
       jwt (>= 2.0)
       oauth2 (~> 1.1)
-      omniauth (~> 2.0)
-      omniauth-oauth2 (~> 1.7.1)
+      omniauth (~> 1.1)
+      omniauth-oauth2 (>= 1.6)
     omniauth-oauth (1.2.0)
       oauth
       omniauth (>= 1.0, < 3)
-    omniauth-oauth2 (1.7.1)
-      oauth2 (~> 1.4)
+    omniauth-oauth2 (1.7.3)
+      oauth2 (>= 1.4, < 3)
       omniauth (>= 1.9, < 3)
     omniauth-twitter (1.4.0)
       omniauth-oauth (~> 1.1)
       rack
     open4 (1.3.4)
     orm_adapter (0.5.0)
-    paper_trail (12.0.0)
+    paper_trail (12.3.0)
       activerecord (>= 5.2)
       request_store (~> 1.1)
-    parallel (1.20.1)
-    paranoia (2.4.3)
-      activerecord (>= 4.0, < 6.2)
-    parser (3.0.1.1)
+    parallel (1.22.1)
+    paranoia (2.6.0)
+      activerecord (>= 5.1, < 7.1)
+    parser (3.1.2.0)
       ast (~> 2.4.1)
     path_expander (1.1.0)
-    pg (1.2.3)
+    patron (0.13.3)
+    pg (1.4.1)
     phantomjs (2.1.1.0)
-    psych (3.3.2)
+    psych (4.0.4)
+      stringio
     ptools (1.4.2)
-    public_activity (1.6.4)
-      actionpack (>= 3.0.0)
-      activerecord (>= 3.0)
+    public_activity (2.0.1)
+      actionpack (>= 5.0.0)
+      activerecord (>= 5.0)
       i18n (>= 0.5.0)
-      railties (>= 3.0.0)
-    public_suffix (4.0.6)
-    puma (5.3.2)
+      railties (>= 5.0.0)
+    public_suffix (4.0.7)
+    puma (5.6.4)
       nio4r (~> 2.0)
-    pundit (2.1.0)
+    pundit (2.2.0)
       activesupport (>= 3.0.0)
-    racc (1.5.2)
-    rack (2.2.3)
-    rack-attack (6.5.0)
+    racc (1.6.0)
+    rack (2.2.3.1)
+    rack-attack (6.6.1)
       rack (>= 1.0, < 3)
     rack-cors (1.1.1)
       rack (>= 2.0.0)
-    rack-mini-profiler (2.3.2)
+    rack-mini-profiler (3.0.0)
       rack (>= 1.2.0)
-    rack-protection (2.1.0)
+    rack-protection (2.2.0)
       rack
-    rack-test (1.1.0)
-      rack (>= 1.0, < 3)
-    rails (6.1.4)
-      actioncable (= 6.1.4)
-      actionmailbox (= 6.1.4)
-      actionmailer (= 6.1.4)
-      actionpack (= 6.1.4)
-      actiontext (= 6.1.4)
-      actionview (= 6.1.4)
-      activejob (= 6.1.4)
-      activemodel (= 6.1.4)
-      activerecord (= 6.1.4)
-      activestorage (= 6.1.4)
-      activesupport (= 6.1.4)
+    rack-test (2.0.1)
+      rack (>= 1.3)
+    rails (7.0.3)
+      actioncable (= 7.0.3)
+      actionmailbox (= 7.0.3)
+      actionmailer (= 7.0.3)
+      actionpack (= 7.0.3)
+      actiontext (= 7.0.3)
+      actionview (= 7.0.3)
+      activejob (= 7.0.3)
+      activemodel (= 7.0.3)
+      activerecord (= 7.0.3)
+      activestorage (= 7.0.3)
+      activesupport (= 7.0.3)
       bundler (>= 1.15.0)
-      railties (= 6.1.4)
-      sprockets-rails (>= 2.0.0)
+      railties (= 7.0.3)
     rails-dom-testing (2.0.3)
       activesupport (>= 4.2.0)
       nokogiri (>= 1.6)
-    rails-erd (1.6.1)
+    rails-erd (1.7.1)
       activerecord (>= 4.2)
       activesupport (>= 4.2)
       choice (~> 0.2.0)
       ruby-graphviz (~> 1.2)
-    rails-html-sanitizer (1.3.0)
+    rails-html-sanitizer (1.4.3)
       loofah (~> 2.3)
-    railties (6.1.4)
-      actionpack (= 6.1.4)
-      activesupport (= 6.1.4)
+    railties (7.0.3)
+      actionpack (= 7.0.3)
+      activesupport (= 7.0.3)
       method_source
-      rake (>= 0.13)
+      rake (>= 12.2)
       thor (~> 1.0)
-    rainbow (3.0.0)
+      zeitwerk (~> 2.5)
+    rainbow (3.1.1)
     rake (13.0.6)
-    rdoc (6.3.1)
-    redis (4.2.5)
-    reek (6.0.4)
+    rdoc (6.4.0)
+      psych (>= 4.0.0)
+    redis (4.7.0)
+    reek (6.1.1)
       kwalify (~> 0.7.0)
-      parser (~> 3.0.0)
-      psych (~> 3.1)
+      parser (~> 3.1.0)
       rainbow (>= 2.0, < 4.0)
-    regexp_parser (2.1.1)
-    request_store (1.5.0)
+    regexp_parser (2.5.0)
+    request_store (1.5.1)
       rack (>= 1.4)
-    resource_kit (0.1.7)
+    resource_kit (0.1.8)
       addressable (>= 2.3.6, < 3.0.0)
     responders (3.0.1)
       actionpack (>= 5.0)
       railties (>= 5.0)
     rexml (3.2.5)
-    rmagick (4.2.2)
-    rspec (3.10.0)
-      rspec-core (~> 3.10.0)
-      rspec-expectations (~> 3.10.0)
-      rspec-mocks (~> 3.10.0)
-    rspec-core (3.10.1)
-      rspec-support (~> 3.10.0)
-    rspec-expectations (3.10.1)
+    rmagick (4.2.5)
+    rspec (3.11.0)
+      rspec-core (~> 3.11.0)
+      rspec-expectations (~> 3.11.0)
+      rspec-mocks (~> 3.11.0)
+    rspec-core (3.11.0)
+      rspec-support (~> 3.11.0)
+    rspec-expectations (3.11.0)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.10.0)
-    rspec-mocks (3.10.2)
+      rspec-support (~> 3.11.0)
+    rspec-mocks (3.11.1)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.10.0)
-    rspec-rails (5.0.1)
+      rspec-support (~> 3.11.0)
+    rspec-rails (5.1.2)
       actionpack (>= 5.2)
       activesupport (>= 5.2)
       railties (>= 5.2)
@@ -427,30 +461,30 @@ GEM
       rspec-expectations (~> 3.10)
       rspec-mocks (~> 3.10)
       rspec-support (~> 3.10)
-    rspec-support (3.10.2)
+    rspec-support (3.11.0)
     rspec_api_documentation (6.1.0)
       activesupport (>= 3.0.0)
       mustache (~> 1.0, >= 0.99.4)
       rspec (~> 3.0)
-    rubocop (1.15.0)
+    rubocop (1.31.0)
       parallel (~> 1.10)
-      parser (>= 3.0.0.0)
+      parser (>= 3.1.0.0)
       rainbow (>= 2.2.2, < 4.0)
       regexp_parser (>= 1.8, < 3.0)
-      rexml
-      rubocop-ast (>= 1.5.0, < 2.0)
+      rexml (>= 3.2.5, < 4.0)
+      rubocop-ast (>= 1.18.0, < 2.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 3.0)
-    rubocop-ast (1.6.0)
-      parser (>= 3.0.1.1)
+    rubocop-ast (1.18.0)
+      parser (>= 3.1.1.0)
     ruby-graphviz (1.2.5)
       rexml
     ruby-progressbar (1.11.0)
-    ruby-statistics (2.1.3)
-    ruby2_keywords (0.0.4)
-    ruby_parser (3.16.0)
-      sexp_processor (~> 4.15, >= 4.15.1)
-    rubycritic (4.6.1)
+    ruby-statistics (3.0.0)
+    ruby2_keywords (0.0.5)
+    ruby_parser (3.19.1)
+      sexp_processor (~> 4.16)
+    rubycritic (4.7.0)
       flay (~> 2.8)
       flog (~> 4.4)
       launchy (>= 2.0.0)
@@ -461,23 +495,22 @@ GEM
       simplecov (>= 0.17.0)
       tty-which (~> 0.4.0)
       virtus (~> 1.0)
-    rubyzip (2.3.0)
+    rubyzip (2.3.2)
     screencap (0.1.4)
       phantomjs
-    sdoc (2.2.0)
+    sdoc (2.4.0)
       rdoc (>= 5.0)
-    searchkick (4.4.4)
-      activemodel (>= 5)
-      elasticsearch (>= 6)
+    searchkick (5.0.4)
+      activemodel (>= 5.2)
       hashie
-    sexp_processor (4.15.3)
+    sexp_processor (4.16.1)
     shoulda (4.0.0)
       shoulda-context (~> 2.0)
       shoulda-matchers (~> 4.0)
     shoulda-context (2.0.0)
     shoulda-matchers (4.5.1)
       activesupport (>= 4.2.0)
-    sidekiq (6.2.1)
+    sidekiq (6.5.1)
       connection_pool (>= 2.2.2)
       rack (~> 2.0)
       redis (>= 4.2.0)
@@ -486,41 +519,38 @@ GEM
       simplecov-html (~> 0.11)
       simplecov_json_formatter (~> 0.1)
     simplecov-html (0.12.3)
-    simplecov_json_formatter (0.1.3)
-    sinatra (2.1.0)
+    simplecov_json_formatter (0.1.4)
+    sinatra (2.2.0)
       mustermann (~> 1.0)
       rack (~> 2.2)
-      rack-protection (= 2.1.0)
+      rack-protection (= 2.2.0)
       tilt (~> 2.0)
     slim (4.1.0)
       temple (>= 0.7.6, < 0.9)
       tilt (>= 2.0.6, < 2.1)
-    spring (2.1.1)
-    sprockets (4.0.2)
-      concurrent-ruby (~> 1.0)
-      rack (> 1, < 3)
-    sprockets-rails (3.2.2)
-      actionpack (>= 4.0)
-      activesupport (>= 4.0)
-      sprockets (>= 3.0.0)
-    sqlite3 (1.4.2)
-    stackprof (0.2.17)
+    spring (4.0.0)
+    sqlite3 (1.4.4)
+    stackprof (0.2.19)
     streamio-ffmpeg (3.0.2)
       multi_json (~> 1.8)
+    stringio (3.0.2)
+    strscan (3.0.3)
     sys-uname (1.2.2)
       ffi (~> 1.1)
     temple (0.8.2)
-    terminal-table (1.6.0)
+    terminal-table (3.0.2)
+      unicode-display_width (>= 1.1.1, < 3)
     terrapin (0.6.0)
       climate_control (>= 0.0.3, < 1.0)
-    thor (1.1.0)
+    thor (1.2.1)
     thread_safe (0.3.6)
     tilt (2.0.10)
+    timeout (0.3.0)
     tty-which (0.4.2)
     tzinfo (2.0.4)
       concurrent-ruby (~> 1.0)
-    unicode-display_width (2.0.0)
-    uniform_notifier (1.14.2)
+    unicode-display_width (2.2.0)
+    uniform_notifier (1.16.0)
     virtus (1.0.5)
       axiom-types (~> 0.1)
       coercible (~> 1.0)
@@ -538,10 +568,10 @@ GEM
     websocket-extensions (0.1.5)
     whenever (1.0.0)
       chronic (>= 0.6.3)
-    zeitwerk (2.4.2)
+    zeitwerk (2.6.0)
 
 PLATFORMS
-  ruby
+  x86_64-linux
 
 DEPENDENCIES
   active_model_serializers
@@ -562,9 +592,12 @@ DEPENDENCIES
   devise
   devise_token_auth!
   dspace_rest_client!
+  elasticsearch (< 7.14)
   execjs
   factory_bot_rails
   faker
+  faraday
+  faraday-net_http_persistent (~> 2.0)
   feature
   ffi-libarchive
   flamegraph
@@ -574,8 +607,9 @@ DEPENDENCIES
   mimemagic
   mina
   minitest-reporters
+  net-http-persistent
   omniauth-facebook
-  omniauth-google-oauth2
+  omniauth-google-oauth2 (= 0.8.2)
   omniauth-twitter
   paper_trail
   paranoia
@@ -610,4 +644,4 @@ DEPENDENCIES
   whenever
 
 BUNDLED WITH
-   2.2.15
+   2.3.15
diff --git a/app/controllers/v1/sessions_controller.rb b/app/controllers/v1/sessions_controller.rb
index 4f8004aedcbb2f8a124fc76e34db6963712717f9..bbe5e9ecd2948f54da59f206600e3ed2632b01a7 100644
--- a/app/controllers/v1/sessions_controller.rb
+++ b/app/controllers/v1/sessions_controller.rb
@@ -21,6 +21,7 @@ require 'open-uri'
   class V1::SessionsController < DeviseTokenAuth::SessionsController
     def create
       # Check
+      puts(resource_params)
       field = (resource_params.keys.map(&:to_sym) & resource_class.authentication_keys).first
 
       @resource = nil
diff --git a/app/models/achievement.rb b/app/models/achievement.rb
index f6175da002c0750d3947f5e770fea91df5cb8e9f..b29f43f06b655ffb6a7e3d4a4d5e87f8bdc24199 100644
--- a/app/models/achievement.rb
+++ b/app/models/achievement.rb
@@ -18,7 +18,7 @@
 
 # == Schema Information
 #
-# Table name: achievement
+# Table name: achievements
 
 # t.string      :name
 # t.string      :description
diff --git a/app/models/action.rb b/app/models/action.rb
index 33cbf2dfc0fc4325ef215348f19c0cec94fd13e5..ff7b2450cb1d12da141d88da11de889ed453deed 100644
--- a/app/models/action.rb
+++ b/app/models/action.rb
@@ -18,7 +18,7 @@
 
 # == Schema Information
 #
-# Table name: action
+# Table name: actions
 
 # t.integer  "name"
 # t.integer  "description"
@@ -26,6 +26,8 @@
 # t.datetime "updated_at"
 # t.integer  "reward_experience"
 
+# this table has the following foreign keys: requirements | action_counters
+
 class Action < ApplicationRecord
   has_many :requirements
   has_many :action_counters
diff --git a/app/models/action_counter.rb b/app/models/action_counter.rb
index bf221cae4a32d1e6f51db47e0593d8986ba2bf4a..30530afad53f4792a2ba3ed9c9ccc90ee838cedf 100644
--- a/app/models/action_counter.rb
+++ b/app/models/action_counter.rb
@@ -18,11 +18,13 @@
 
 # == Schema Information
 #
-# Table name: action_counter
+# Table name: action_counters
 
 # t.belongs_to      :action, index: true
 # t.belongs_to      :user, index:true
 # t.integer         :counter, default: 0
+# t.datetime "created_at",    null: false
+# t.datetime "updated_at",    null: false
 
 class ActionCounter < ApplicationRecord
   belongs_to :action
diff --git a/app/models/collection.rb b/app/models/collection.rb
index a9a145d26deea2805bfa2992ed663ca823c1ada5..791c58786b639d54ac267ca99b5b69552fbe6837 100644
--- a/app/models/collection.rb
+++ b/app/models/collection.rb
@@ -39,7 +39,8 @@
 #  thumbnail_content_type :string
 #  thumbnail_file_size    :integer
 #  thumbnail_updated_at   :datetime
-#
+#  review_average:        :float            default("0.0")
+#  curator                :string          
 
 class Collection < ApplicationRecord
   include Reviewable
diff --git a/app/models/collection_item.rb b/app/models/collection_item.rb
index 9088f56896955cf4f2ce8d8fcd6ebb0917a2395e..a658e3aa7bbe4ac5e66c7b8a2087140851193f37 100644
--- a/app/models/collection_item.rb
+++ b/app/models/collection_item.rb
@@ -25,7 +25,7 @@
 #  collectionable_id   :integer
 #  collectionable_type :string
 #  collection_id       :integer
-#  order               :integer
+#  position               :integer
 #  created_at          :datetime         not null
 #  updated_at          :datetime         not null
 #
diff --git a/app/models/complaint.rb b/app/models/complaint.rb
index cf318c09b259e7ef97481c07b7d3567b8ecc49e6..e710581ac3c80bafadc3e962ce85111cca0abbd1 100644
--- a/app/models/complaint.rb
+++ b/app/models/complaint.rb
@@ -24,12 +24,12 @@
 #  id                  :integer          not null, primary key
 #  description         :text
 #  user_id             :integer
-#  complainable_id    :integer
-#  complainable_type  :string
+#  complainable_id     :integer
+#  complainable_type   :string
 #  complaint_reason_id :integer
 #  created_at          :datetime         not null
 #  updated_at          :datetime         not null
-#
+#  state               :integer          default("0")
 
 class Complaint < ApplicationRecord
   # *current_user* create complaint about *complaint_reason* for *complaintable*
diff --git a/app/models/complaint_reason.rb b/app/models/complaint_reason.rb
index c5b4e58ce9eac13f35f6bea2e89d78cc3d7d726f..7352be4628014087c73cbea734ce41888052e97d 100644
--- a/app/models/complaint_reason.rb
+++ b/app/models/complaint_reason.rb
@@ -25,7 +25,7 @@
 #  reason     :text
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
-#
+#  status     :integer          default("0")
 
 class ComplaintReason < ApplicationRecord
   # *current_user* create complaint reason
diff --git a/app/models/contact.rb b/app/models/contact.rb
index 298bab6b27a5f903a850aa83551a00d226a911b5..b0f55bd029f8713497f1a588931e86fa82091890 100644
--- a/app/models/contact.rb
+++ b/app/models/contact.rb
@@ -25,6 +25,8 @@
 #  name                   :string
 #  email                  :string
 #  message                :text
-#
+#  created_at          :datetime         not null
+#  updated_at          :datetime         not null
+
 class Contact < ApplicationRecord
 end
diff --git a/app/models/institution.rb b/app/models/institution.rb
index 7171be3c9768dabc8d03682224ae0dd889812bc4..3e7b2aab51ae78d9cdeb1b13eb9fbde4f40903a4 100644
--- a/app/models/institution.rb
+++ b/app/models/institution.rb
@@ -21,15 +21,19 @@
 #
 # Table name: institutions
 #
-#  id          :integer          not null, primary key
-#  name        :string
-#  address     :string
-#  city        :string
-#  country     :string
-#  description :text
-#  created_at  :datetime         not null
-#  updated_at  :datetime         not null
-#
+#  id                     :integer          not null, primary key
+#  name                   :string
+#  address                :string
+#  city                   :string
+#  country                :string
+#  description            :text
+#  created_at             :datetime         not null
+#  updated_at             :datetime         not null
+#  avatar_file_name       :string
+#  avatar_content_type    :string
+#  avatar_file_size       :integer
+#  avatar_updated_at      :datetime
+#  learning_objects_count :integer          default("0")
 
 class Institution < ApplicationRecord
   include Tagger
diff --git a/app/models/item.rb b/app/models/item.rb
index 51e40f5508cd88b07fe9bbb5df2376ac43334b96..025848cfcef9f33e636aee85c016055acbac1b70 100644
--- a/app/models/item.rb
+++ b/app/models/item.rb
@@ -34,6 +34,8 @@
 # created_at:           datetime
 # updated_at:           datetime
 
+# this table has one foreign key: achievement_id.
+
 class Item < ApplicationRecord
   belongs_to :achievement, optional: true
   has_many :user_items
diff --git a/app/models/learning_object.rb b/app/models/learning_object.rb
index 10451b6f8921f176769180890aa8b6f38b8be3ac..a1ca7445bd1235bcaa586691dc90aac9b9d98ae9 100644
--- a/app/models/learning_object.rb
+++ b/app/models/learning_object.rb
@@ -28,9 +28,7 @@
 #  description            :text
 #  published_at           :datetime
 #  score                  :float            default("0.0")
-#  school_level           :integer
 #  metadata               :jsonb            default("{}")
-#  keywords               :text
 #  publisher_id           :integer
 #  publisher_type         :string
 #  object_type_id         :integer
@@ -40,7 +38,16 @@
 #  downloads_count        :integer          default("0")
 #  likes_count            :integer          default("0")
 #  shares_count           :integer          default("0")
-#  state                  :string           default("published")
+#  state                  :string           default("0")
+#  license_id             :integer
+#  link                   :string 
+#  software               :string
+#  review_average         :float            default("0.0")
+#  curator                :string
+#  magnetlink             :string
+#  terms_of_service       :boolean
+#  submission_id          :integer
+#  legacy_dspace_id       :string
 #  thumbnail_file_name    :string
 #  thumbnail_content_type :string
 #  thumbnail_file_size    :integer
@@ -92,18 +99,10 @@ class LearningObject < ApplicationRecord
   default_scope { includes(:object_type, :attachment, :attachments) }
   scope :missing_thumbnail, ->() { where(thumbnail_file_name: nil) }
 
-  searchkick language: 'brazilian', match: :word_start, searchable: [:name, :description, :author, :object_type, :tags, :subjects, :educational_stages, :languages], callbacks: :async, index_prefix: Socket.gethostname.downcase, merge_mappings: true, mappings: {
-    learning_object: {
-      properties: {
-        published_at: {
-          type: "date"
-        }
-      }
-    }
-  }
+  searchkick language: 'brazilian', match: :word_start, searchable: [:name, :description, :author, :object_type, :tags, :subjects, :educational_stages, :languages], callbacks: :async, index_prefix: Socket.gethostname.downcase, merge_mappings: true
+  {"mappings": {"_doc": {"properties": {"published_at": { "type": "date" }}}}}
 
   acts_as_paranoid
-
   scope :search_import, -> { includes(:object_type, :tags, :subjects, :educational_stages, :publisher) }
 
   def search_data
diff --git a/app/models/package.rb b/app/models/package.rb
index 3acede537ab28157d0d02e5236209b37be825c95..b131ff841f4fd51b4d932641c0f44656b75c19c1 100644
--- a/app/models/package.rb
+++ b/app/models/package.rb
@@ -21,6 +21,7 @@
 #
 # Table name: packages
 #
+# id                   :integer          not null, primary key
 # package_items_id      integer
 # created_at            datetime       null: false
 # updated_at            datetime       null: false
diff --git a/app/models/progress.rb b/app/models/progress.rb
index 8370eb4f98d4cdb88afd8fcee00249e4418ca005..3207d2cf44b7105183e0cb8a6e5b1b8dad349400 100644
--- a/app/models/progress.rb
+++ b/app/models/progress.rb
@@ -18,12 +18,14 @@
 
 # == Schema Information
 #
-# Table name: progress
+# Table name: progresses
 
 # t.belongs_to  :user
 # t.belongs_to  :achievement
 # t.belongs_to  :progress_type
 # t.integer     :counter, default: 0
+# t.datetime "created_at",    null: false
+# t.datetime "updated_at",    null: false
 
 class Progress < ApplicationRecord
   belongs_to :requirement
diff --git a/app/models/question.rb b/app/models/question.rb
index 6a4b3c70bfd60b3d603f0f187bb7b9bfc7e1dc6c..13443a9970711ad1d4ef79ebdd18cb34a1dcb610 100644
--- a/app/models/question.rb
+++ b/app/models/question.rb
@@ -21,7 +21,7 @@
 # Table name: questions
 
 # t.string   "description"
-# t.integer  "status",      default: 0
+# t.integer  "status",                  default: 0
 # t.datetime "created_at",              null: false
 # t.datetime "updated_at",              null: false
 
diff --git a/app/models/rate.rb b/app/models/rate.rb
index 52f4af694c5d8cea49c598f4592e4701c2d4b0a9..96c987c1e4a5577632cb8678cb77c1143d63a05e 100644
--- a/app/models/rate.rb
+++ b/app/models/rate.rb
@@ -27,6 +27,7 @@
 #  review_id  :integer
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
+
 class Rate < ApplicationRecord
   # *current_user* rate a review *review*
   include Trackable
diff --git a/app/models/requirement.rb b/app/models/requirement.rb
index 58d1a41b5c95df284bf16efcbda620e86d38681f..80ca577d5719fc039d97b982cab963f009173f0b 100644
--- a/app/models/requirement.rb
+++ b/app/models/requirement.rb
@@ -19,10 +19,10 @@
 
 # == Schema Information
 #
-# Table name: progress_type
+# Table name: requirements
 
 # t.belongs_to  "action"
-# t.belnogs_to  "achievement"
+# t.belongs_to  "achievement"
 # t.string      "description"
 # t.integer     "goal"
 # t.boolean     "repeatable"
diff --git a/app/models/suggestion.rb b/app/models/suggestion.rb
index 82fa9ecc7ff8e119b8a631bc402a34b5e848c890..7a2d67a2155881cca5f0deb065b06ceb0932c4c1 100644
--- a/app/models/suggestion.rb
+++ b/app/models/suggestion.rb
@@ -26,7 +26,9 @@
 #  link                   :string
 #  description            :text
 #  status                 :integer
-#
+#  created_at             :datetime         not null
+#  updated_at             :datetime         not null
+
 class Suggestion < ApplicationRecord
   enum status: { created: 0, accepted: 1, rejected: 2, loadded: 3 }
 end
diff --git a/app/models/unlocked_achievement.rb b/app/models/unlocked_achievement.rb
index 84a33349750dea44d2ae5ae6d60c8ea10323a424..59fff47cf6911e442c345e55a647b0db4e9907ee 100644
--- a/app/models/unlocked_achievement.rb
+++ b/app/models/unlocked_achievement.rb
@@ -20,8 +20,10 @@
 #
 # Table name: unlocked_achievement
 
-# t.belongs_to      :achievement, index: true
-# t.belongs_to      :user, index:true
+# t.belongs_to      :achievement,     index: true
+# t.belongs_to      :user,            index:true
+# created_at        :datetime         not null
+# updated_at        :datetime         not null
 
 class UnlockedAchievement < ApplicationRecord
   belongs_to :achievement
diff --git a/app/models/user.rb b/app/models/user.rb
index 05c0df2fcb1892ab2db2cdcf1d5c4b3f3cb29cdf..bc367036187c0f12c450b0bb23d779cd2fcfc0f0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -51,7 +51,34 @@
 #  score                  :float            default("0.0")
 #  follows_count          :integer          default("0")
 #  description            :text
-#
+#  likes_count            :integer
+#  learning_objects_count :integer
+#  collections_count      :integer
+#  nickname               :string
+#  cover_file_name        :string
+#  cover_content_type     :string
+#  cover_file_size        :integer
+#  cover_updated_at       :datetime
+#  education              :string
+#  submitter_request      :integer          default("0")
+#  dspace_handle          :string
+#  dspace_sets            :text             default("{}")
+#  teacher_id             :string
+#  birthday               :datetime
+#  school_id              :integer
+#  terms_accepted_at      :datetime
+#  cpf                    :string
+#  state                  :integer          default("0")
+#  suspended_at           :datetime
+#  reactivated_at         :datetime
+#  times_blocked          :integer
+#  ask_teacher_question   :boolean          default("true")
+#  dspace_collection      :string           default("{}")
+#  allow_experience_change:boolean
+#  experience             :integer          default("0")
+#  level                  :integer          default("1")
+#  points                 :integer          default("0")
+#  last_sign_in_day       :datetime
 
 class User < ApplicationRecord
   include Followable
diff --git a/app/models/user_item.rb b/app/models/user_item.rb
index c45cc51626457a215f9cb3fdf430ee0b56474af2..98859f2452f347c67b61106460a468d7875653ff 100644
--- a/app/models/user_item.rb
+++ b/app/models/user_item.rb
@@ -18,7 +18,7 @@
 
 # == Schema Information
 #
-# Table name: inventory
+# Table name: user_items
 
 # t.belongs_to  :user, index: true
 # t.belongs_to  item, index: true
diff --git a/config/database.yml b/config/database.yml
index c36c3441735a6f541e1421c08c120a20285955e4..28a1dd5ec120c436f9feb8ead10f1b666d7088c0 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -6,16 +6,16 @@ development:
   adapter: postgresql
   encoding: unicode
   database: portalmec_dev
-  username: portalmec
-  password: 123mudar
+  username: luan
+  password: luanmatheus
 
 test:
   adapter: postgresql
   encoding: unicode
   database: portalmec_test
-  username: portalmec
-  password: 123mudar
-  host: postgres
+  username: luan
+  password: luanmatheus
+# host: postgres 
 
 production:
   adapter: postgresql
diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb
index 2080bde48474465229d2e29d7998d358266d48b9..52ebee06a1d3a27f7ebc3fef434fe22871ebe56b 100644
--- a/config/initializers/elasticsearch.rb
+++ b/config/initializers/elasticsearch.rb
@@ -34,7 +34,7 @@ if Rails.env.production?
   )
 elsif Rails.env.test?
   elasticsearch_client = Elasticsearch::Client.new(
-    url: 'elasticsearch:9200',
+    url: 'localhost:9200',
     transport_options: {request: {timeout: 550}}
   )
 else