Table pi.audit_seq doesn't exist

Hello all,
I’m installing PrivacyIDEA 3.7.1 on Redhat 8.
I’m facing this issue, when httpd is up then I access the web UI of PrivacyIDEA, it shows 500 error code.
I’ve check the log file error.log:

[Wed Jun 22 09:30:53.081679 2022] [ssl:warn] [pid 49666:tid 140153533253952] AH01906: localhost:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jun 22 09:30:53.081778 2022] [ssl:warn] [pid 49666:tid 140153533253952] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 22 09:30:53.127400 2022] [ssl:warn] [pid 49666:tid 140153533253952] AH01906: localhost:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jun 22 09:30:53.127449 2022] [ssl:warn] [pid 49666:tid 140153533253952] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 22 09:31:03.417350 2022] [wsgi:error] [pid 49668:tid 140153184147200] The configuration name is: production
[Wed Jun 22 09:31:03.417492 2022] [wsgi:error] [pid 49668:tid 140153184147200] Additional configuration will be read from the file /etc/privacyidea/pi.cfg
[Wed Jun 22 09:31:03.652144 2022] [wsgi:error] [pid 49668:tid 140153184147200] Using PI_LOGLEVEL and PI_LOGFILE.
[Wed Jun 22 09:31:03.652278 2022] [wsgi:error] [pid 49668:tid 140153184147200] Using PI_LOGLEVEL 20.
[Wed Jun 22 09:31:03.652304 2022] [wsgi:error] [pid 49668:tid 140153184147200] Using PI_LOGFILE /var/log/privacyidea/privacyidea.log.
[Wed Jun 22 09:31:03.709831 2022] [wsgi:error] [pid 49668:tid 140153184147200] [remote 10.214.102.133:51969] /usr/local/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:550: SAWarning: relationship 'ResolverRealm.resolver' will copy column resolver.id to column resolverrealm.resolver_id, which conflicts with relationship(s): 'Resolver.realm_list' (copies resolver.id to resolverrealm.resolver_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   To silence this warning, add the parameter 'overlaps="realm_list"' to the 'ResolverRealm.resolver' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
[Wed Jun 22 09:31:03.709924 2022] [wsgi:error] [pid 49668:tid 140153184147200] [remote 10.214.102.133:51969]   mapper = orm.class_mapper(type)
[Wed Jun 22 09:31:03.712716 2022] [wsgi:error] [pid 49668:tid 140153184147200] [remote 10.214.102.133:51969] /usr/local/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:550: SAWarning: relationship 'ResolverRealm.realm' will copy column realm.id to column resolverrealm.realm_id, which conflicts with relationship(s): 'Realm.resolver_list' (copies realm.id to resolverrealm.realm_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   To silence this warning, add the parameter 'overlaps="resolver_list"' to the 'ResolverRealm.realm' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
[Wed Jun 22 09:31:03.712776 2022] [wsgi:error] [pid 49668:tid 140153184147200] [remote 10.214.102.133:51969]   mapper = orm.class_mapper(type)
[Wed Jun 22 09:31:04.535332 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] INFO:privacyidea.lib.pooling:Created a new engine registry: <privacyidea.lib.pooling.SharedEngineRegistry object at 0x7f77d8ae0bb0>
[Wed Jun 22 09:31:04.537378 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] INFO:privacyidea.lib.pooling:Creating a new engine and connection pool for key sqlaudit
[Wed Jun 22 09:31:04.778546 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] ERROR:privacyidea.app:Exception on /register [GET]
[Wed Jun 22 09:31:04.778605 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] Traceback (most recent call last):
[Wed Jun 22 09:31:04.778650 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app
[Wed Jun 22 09:31:04.778665 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.full_dispatch_request()
[Wed Jun 22 09:31:04.778678 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1526, in full_dispatch_request
[Wed Jun 22 09:31:04.778690 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.finalize_request(rv)
[Wed Jun 22 09:31:04.778702 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1547, in finalize_request
[Wed Jun 22 09:31:04.778715 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.process_response(response)
[Wed Jun 22 09:31:04.778715 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.process_response(response)
[Wed Jun 22 09:31:04.778727 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1889, in process_response
[Wed Jun 22 09:31:04.778780 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.ensure_sync(func)(response)
[Wed Jun 22 09:31:04.778795 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 132, in policy_wrapper
[Wed Jun 22 09:31:04.778809 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.function(self.request, response, **kwds)
[Wed Jun 22 09:31:04.778821 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 179, in sign_response
[Wed Jun 22 09:31:04.778834 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     content = response_object.json
[Wed Jun 22 09:31:04.778847 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/app.py", line 83, in json
[Wed Jun 22 09:31:04.778859 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.get_json(cache=False)
[Wed Jun 22 09:31:04.778871 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] TypeError: get_json() got an unexpected keyword argument 'cache'
[Wed Jun 22 09:31:04.984576 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] ERROR:privacyidea.app:Request finalizing failed with an error while handling an error
[Wed Jun 22 09:31:04.984631 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] Traceback (most recent call last):
[Wed Jun 22 09:31:04.984645 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app
[Wed Jun 22 09:31:04.984658 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.full_dispatch_request()
[Wed Jun 22 09:31:04.984671 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1526, in full_dispatch_request
[Wed Jun 22 09:31:04.984683 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.finalize_request(rv)
[Wed Jun 22 09:31:04.984696 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1547, in finalize_request
[Wed Jun 22 09:31:04.984708 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.process_response(response)
[Wed Jun 22 09:31:04.984806 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1889, in process_response
[Wed Jun 22 09:31:04.984829 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.ensure_sync(func)(response)
[Wed Jun 22 09:31:04.984843 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 132, in policy_wrapper
[Wed Jun 22 09:31:04.984856 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.function(self.request, response, **kwds)
[Wed Jun 22 09:31:04.984869 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 179, in sign_response
[Wed Jun 22 09:31:04.984892 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     content = response_object.json
[Wed Jun 22 09:31:04.984914 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/app.py", line 83, in json
[Wed Jun 22 09:31:04.984936 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.get_json(cache=False)
[Wed Jun 22 09:31:04.984951 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] TypeError: get_json() got an unexpected keyword argument 'cache'
[Wed Jun 22 09:31:04.984963 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]
[Wed Jun 22 09:31:04.984975 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] During handling of the above exception, another exception occurred:
[Wed Jun 22 09:31:04.984987 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]
[Wed Jun 22 09:31:04.984999 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] Traceback (most recent call last):
[Wed Jun 22 09:31:04.985011 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1547, in finalize_request
[Wed Jun 22 09:31:04.985023 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.process_response(response)
[Wed Jun 22 09:31:04.985035 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib64/python3.8/site-packages/flask/app.py", line 1889, in process_response
[Wed Jun 22 09:31:04.985048 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     response = self.ensure_sync(func)(response)
[Wed Jun 22 09:31:04.985060 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 132, in policy_wrapper
[Wed Jun 22 09:31:04.985074 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.function(self.request, response, **kwds)
[Wed Jun 22 09:31:04.985090 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/api/lib/postpolicy.py", line 179, in sign_response
[Wed Jun 22 09:31:04.985113 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     content = response_object.json
[Wed Jun 22 09:31:04.985138 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]   File "/usr/local/lib/python3.8/site-packages/privacyidea/app.py", line 83, in json
[Wed Jun 22 09:31:04.985158 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988]     return self.get_json(cache=False)
[Wed Jun 22 09:31:04.985187 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] TypeError: get_json() got an unexpected keyword argument 'cache'
[Wed Jun 22 09:31:05.000345 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] ERROR:privacyidea.lib.auditmodules.sqlaudit:exception StatementError('(sqlalchemy.exc.ProgrammingError) (pymysql.err.ProgrammingError) (1146, "Table \\'pi.audit_seq\\' doesn\\'t exist")')
[Wed Jun 23 09:31:05.000962 2022] [wsgi:error] [pid 49668:tid 140153083434752] [remote 10.214.102.133:51988] ERROR:privacyidea.lib.auditmodules.sqlaudit:DATA: {'startdate': datetime.datetime(2022, 6, 22, 9, 31, 4, 297214), 'success': True, 'action_detail': '', 'client': 'x.x.x.x', 'client_user_agent': 'edge', 'privacyidea_server': 'x.x.x.x', 'action': 'GET /register', 'info': '500 Internal Server Error: The server encountered ', 'policies': ''}

Could anyone solve this issue please ?
Thank you all.