If you are receiving this error when loading the webpage for your Airflow instance, it means that you have an airflow 2 deployment looking at an airflow 1 database.
You need to exec onto one of your airflow containers and run
airflow db upgrade. Watch the messages put out by this command carefully. If you have any incompatible values in your metadata db (e.g. one of your connections has a conn_type of NULL, but the column has a non-NULL constraint in airflow 2) the upgrade will fail. You must manually fix all such incompatibilities until the script succeeds.
Then, restart all your airflow containers and your webpage should load correctly.