tullis commented on issue #23483:
URL: https://github.com/apache/superset/issues/23483#issuecomment-1725316710
I am also affected by this bug, attempting to upgrade from Superset 1.5.3 to
2.1.1.
When running `superset init` I receive the following error:
```
MySQLdb.ProgrammingError: (1146, "Table
'superset_staging.ab_permission_view_role_id_seq' doesn't exist")
```
We can see that the error is correct, that table is not present.
```
MariaDB [superset_staging]> SELECT table_name
-> FROM information_schema.tables
-> WHERE table_name LIKE 'ab_%';
+-------------------------+
| table_name |
+-------------------------+
| ab_user_role |
| ab_user |
| ab_permission_view_role |
| ab_role |
| ab_register_user |
| ab_permission_view |
| ab_view_menu |
| ab_permission |
| ab_user_role |
| ab_user |
| ab_permission_view_role |
| ab_role |
| ab_register_user |
| ab_permission_view |
| ab_view_menu |
| ab_permission |
| ab_user_role |
| ab_user |
| ab_permission_view_role |
| ab_role |
| ab_register_user |
| ab_permission_view |
| ab_view_menu |
| ab_permission |
| ab_user_role |
| ab_user |
| ab_permission_view_role |
| ab_role |
| ab_register_user |
| ab_permission_view |
| ab_view_menu |
| ab_permission |
| ab_user_role |
| ab_user |
| ab_permission_view_role |
| ab_role |
| ab_register_user |
| ab_permission_view |
| ab_view_menu |
| ab_permission |
+-------------------------+
40 rows in set (0.004 sec)
```
Database: MariaDB 10.4.18
sqlalchemy: 1.4.36 (I have also tried 1.4.35)
mysqlclient: 2.2.0
The `tab_state` table is empty:
```
MariaDB [superset_staging]> select count(*) from tab_state;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.001 sec)
```
The `superset db upgrade` completed with the following output:
```
(venv) superset@an-tool1005:~$ superset db upgrade
Loaded your LOCAL configuration at [/etc/superset/superset_config.py]
logging was configured successfully
2023-09-18 23:35:54,609:INFO:superset.utils.logging_configurator:logging was
configured successfully
2023-09-18 23:35:54,619:INFO:root:Configured event logger of type <class
'superset.utils.log.DBEventLogger'>
We haven't found any Content Security Policy (CSP) defined in the
configurations. Please make sure to configure CSP using the TALISMAN_ENABLED
and TALISMAN_CONFIG keys or any other external software. Failing to configure
CSP have serious security implications. Check
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You
can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
2023-09-18 23:35:54,620:WARNING:superset.initialization:We haven't found any
Content Security Policy (CSP) defined in the configurations. Please make sure
to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any
other external software. Failing to configure CSP have serious security
implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for
more information. You can disable this warning using the
CONTENT_SECURITY_POLICY_WARNING key.
No PIL installation found
2023-09-18 23:35:54,857:INFO:superset.utils.screenshots:No PIL installation
found
/srv/deployment/analytics/superset/venv/lib/python3.9/site-packages/flask_appbuilder/models/sqla/interface.py:67:
SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to
column slices.datasource_id, which conflicts with relationship(s):
'Slice.table' (copies tables.id to slices.datasource_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="table"' to the 'SqlaTable.slices' relationship.
(Background on this error at: https://sqlalche.me/e/14/qzyx)
for prop in class_mapper(obj).iterate_properties:
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 58df9d617f14 ->
2ed890b36b94, rm_time_range_endpoints_from_qc
INFO [alembic.runtime.migration] Running upgrade 2ed890b36b94 ->
b0d0249074e4, deprecate time_range_endpoints v2
INFO [alembic.runtime.migration] Running upgrade 2ed890b36b94 ->
8b841273bec3, sql_lab_models_database_constraint_updates
INFO [alembic.runtime.migration] Running upgrade 8b841273bec3, b0d0249074e4
-> 9d8a8d575284, merge point
INFO [alembic.runtime.migration] Running upgrade 9d8a8d575284 ->
cecc6bf46990, rm_time_range_endpoints_2
INFO [alembic.runtime.migration] Running upgrade cecc6bf46990 ->
ad07e4fdbaba, rm_time_range_endpoints_from_qc_3
slices updated with no time_range_endpoints: 1398
INFO [alembic.runtime.migration] Running upgrade ad07e4fdbaba ->
a9422eeaae74, new_dataset_models_take_2
>> Copy 184 physical tables to sl_tables...
>> Copy 1,411 SqlaTable to sl_datasets...
Copy dataset owners...
Link physical datasets with tables...
>> Copy 8,159 table columns to sl_columns...
Link all columns to sl_datasets...
>> Copy 1,552 metrics to sl_columns...
Link metric columns to datasets...
>> Run postprocessing on 9,711 columns
[Column 1 to 9,711] 8,459 may be updated
Assign table column relations...
>> Run postprocessing on 1411 datasets
Process dataset 1~1411...
>> Assign new UUIDs to tables...
Adding uuids for `sl_tables`...
Done. Assigned 184 uuids in 0.013s.
>> Drop intermediate columns...
INFO [alembic.runtime.migration] Running upgrade a9422eeaae74 ->
cbe71abde154, fix report schedule and execution log
INFO [alembic.runtime.migration] Running upgrade cbe71abde154 ->
6f139c533bea, adding advanced data type to column models
INFO [alembic.runtime.migration] Running upgrade 6f139c533bea ->
e786798587de, Delete None permissions
Going to delete a data access permission [datasource_access on
[None].[joal-hive-presto-Untitled Query-SJe4g_j_PG](id:5)]
<snip>
Going to delete a data access permission [schema_access on [None].[event]]
<snip>
INFO [alembic.runtime.migration] Running upgrade e786798587de ->
e09b4ae78457, Resize key_value blob
INFO [alembic.runtime.migration] Running upgrade e09b4ae78457 ->
f3afaf1f11f0, add_unique_name_desc_rls
INFO [alembic.runtime.migration] Running upgrade f3afaf1f11f0 ->
7fb8bca906d2, permalink_rename_filterState
INFO [alembic.runtime.migration] Running upgrade 7fb8bca906d2 ->
cdcf3d64daf4, Add user_id and dttm composite index to Log model
INFO [alembic.runtime.migration] Running upgrade cdcf3d64daf4 ->
c747c78868b6, Migrating legacy TreeMap
INFO [alembic.runtime.migration] Running upgrade c747c78868b6 ->
06e1e70058c7, Migrating legacy Area
INFO [alembic.runtime.migration] Running upgrade 06e1e70058c7 ->
a39867932713, query_context_to_mediumtext
INFO [alembic.runtime.migration] Running upgrade a39867932713 ->
409c7b420ab0, add created_by_fk as owner
INFO [alembic.runtime.migration] Running upgrade 409c7b420ab0 ->
ffa79af61a56, rename report_schedule.extra to extra_json
INFO [alembic.runtime.migration] Running upgrade ffa79af61a56 ->
6d3c6f9d665d, fix_table_chart_conditional_formatting_colors
INFO [alembic.runtime.migration] Running upgrade 6d3c6f9d665d ->
291f024254b5, drop_column_allow_multi_schema_metadata_fetch
INFO [alembic.runtime.migration] Running upgrade 291f024254b5 ->
deb4c9d4a4ef, parameters in saved queries
INFO [alembic.runtime.migration] Running upgrade deb4c9d4a4ef ->
4ce1d9b25135, remove_filter_bar_orientation
INFO [alembic.runtime.migration] Running upgrade 4ce1d9b25135 ->
f3c2d8ec8595, create_ssh_tunnel_credentials_tbl
INFO [alembic.runtime.migration] Running upgrade f3c2d8ec8595 ->
9c2a5681ddfd, convert key-value entries to json
(venv) superset@an-tool1005:~$
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]