<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">Other Airflow 2 version (please specify below)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">When introducing new DAGs to our Airflow 2.4.0 environment, the web server failed to update Flask permissions and the UI could not show the DAGs, although they were accessible through airflow CLI (<code class="notranslate">airflow dags list</code>, <code class="notranslate">airflow tasks list &lt;dag&gt;</code>, <code class="notranslate">airflow tasks render &lt;dag&gt; &lt;task&gt; &lt;date&gt;</code>).<br>
I tried to fix the problem with several restarts and even an <code class="notranslate">airflow db upgrade</code>, but it did not work.<br>
Interestingly, I did not encounter this problem in our staging environment (which is identical to our production).<br>
I got these errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 2, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 3, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 1, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 2, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 3, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 1, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)"><pre class="notranslate"><code class="notranslate">DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 2, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 3, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG:glue_catalog_restore).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 1, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 2, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 3, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG:mariadb_dump_11).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 1, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
</code></pre></div>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Airflow UI should have worked,</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">???</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.3 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow                      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow-2.4.0-py3-none-any.whl
apache-airflow-providers-amazon     @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_amazon-6.0.0-py3-none-any.whl
apache-airflow-providers-common-sql @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_common_sql-1.2.0-py3-none-any.whl
apache-airflow-providers-ftp        @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ftp-3.1.0-py3-none-any.whl
apache-airflow-providers-http       @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_http-4.0.0-py3-none-any.whl
apache-airflow-providers-imap       @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_imap-3.0.0-py3-none-any.whl
apache-airflow-providers-mongo      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mongo-3.0.0-py3-none-any.whl
apache-airflow-providers-mysql      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mysql-3.2.1-py3-none-any.whl
apache-airflow-providers-pagerduty  @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_pagerduty-3.0.0-py3-none-any.whl
apache-airflow-providers-postgres   @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_postgres-5.2.2-py3-none-any.whl
apache-airflow-providers-redis      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_redis-3.0.0-py3-none-any.whl
apache-airflow-providers-sendgrid   @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sendgrid-3.0.0-py3-none-any.whl
apache-airflow-providers-slack      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_slack-6.0.0-py3-none-any.whl
apache-airflow-providers-sqlite     @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sqlite-3.2.1-py3-none-any.whl
apache-airflow-providers-ssh        @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ssh-3.2.0-py3-none-any.whl
apache-airflow-providers-vertica    @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_vertica-3.2.1-py3-none-any.whl

### Deployment

Virtualenv installation

### Deployment details

Python 3.8.10
pip 22.3
setuptools 65.5.0

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)"><pre class="notranslate"><code class="notranslate">apache-airflow                      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow-2.4.0-py3-none-any.whl
apache-airflow-providers-amazon     @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_amazon-6.0.0-py3-none-any.whl
apache-airflow-providers-common-sql @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_common_sql-1.2.0-py3-none-any.whl
apache-airflow-providers-ftp        @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ftp-3.1.0-py3-none-any.whl
apache-airflow-providers-http       @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_http-4.0.0-py3-none-any.whl
apache-airflow-providers-imap       @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_imap-3.0.0-py3-none-any.whl
apache-airflow-providers-mongo      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mongo-3.0.0-py3-none-any.whl
apache-airflow-providers-mysql      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mysql-3.2.1-py3-none-any.whl
apache-airflow-providers-pagerduty  @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_pagerduty-3.0.0-py3-none-any.whl
apache-airflow-providers-postgres   @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_postgres-5.2.2-py3-none-any.whl
apache-airflow-providers-redis      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_redis-3.0.0-py3-none-any.whl
apache-airflow-providers-sendgrid   @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sendgrid-3.0.0-py3-none-any.whl
apache-airflow-providers-slack      @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_slack-6.0.0-py3-none-any.whl
apache-airflow-providers-sqlite     @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sqlite-3.2.1-py3-none-any.whl
apache-airflow-providers-ssh        @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ssh-3.2.0-py3-none-any.whl
apache-airflow-providers-vertica    @ file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_vertica-3.2.1-py3-none-any.whl

### Deployment

Virtualenv installation

### Deployment details

Python 3.8.10
pip 22.3
setuptools 65.5.0

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
</code></pre></div>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.4.0</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Stopped existing processes, upgraded from airflow 2.3.4 to 2.4.0, and ran airflow db upgrade successfully. Upon restarting the services, I'm not seeing any dag runs from the past 10 days. I kick off a new job, and I don't see it show up in the grid view. Upon checking the systemd logs, I see that there are a lot of postgress errors with webserver. Below is a sample of such errors.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'Datasets'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,183] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 13, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 13, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,209] {manager.py:420} ERROR - Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, Datasets).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'Datasets'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,212] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 17, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 17, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,229] {manager.py:420} ERROR - Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, DAG Warnings).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG Warnings'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,232] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 17, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 17, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,250] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column &quot;id&quot; violates not-null constraint
DETAIL:  Failing row contains (null, 13, 23)."><pre class="notranslate"><code class="notranslate">[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'Datasets'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,183] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 13, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 13, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,209] {manager.py:420} ERROR - Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, Datasets).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'Datasets'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,212] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 17, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 17, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,229] {manager.py:420} ERROR - Add View Menu Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, DAG Warnings).

[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING ab_view_menu.id]
[parameters: {'name': 'DAG Warnings'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,232] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 17, null).

[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 17, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
[2022-09-19 14:03:16,250] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, 13, 23).
</code></pre></div>
<p dir="auto">I tried running airflow db check, init, check-migration, upgrade without any errors, but the errors still remain.</p>
<p dir="auto">Please let me know if I missed any steps during the upgrade, or if this is a known issue with a workaround.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">All dag runs should be visible</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">upgrade airflow, upgrade db, restart the services</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 18.04.6 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>