You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/11/20 06:16:41 UTC

[GitHub] [incubator-superset] hushaoqing edited a comment on issue #8060: SIP-23: Persist SQL Lab state in the backend

hushaoqing edited a comment on issue #8060: SIP-23: Persist SQL Lab state in the backend
URL: https://github.com/apache/incubator-superset/pull/8060#issuecomment-555856515
 
 
   @betodealmeida
   
   `DB Migration Error` when I run `db upgrade` from version `0.28.1` to the `latest`
   
   ```
   sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (3780, "Referencing column 'latest_query_id' and referenced column 'client_id' in foreign key constraint 'tab_state_ibfk_4' are incompatible.")
   [SQL: 
   CREATE TABLE tab_state (
           created_on DATETIME, 
           changed_on DATETIME, 
           extra_json TEXT, 
           id INTEGER NOT NULL AUTO_INCREMENT, 
           user_id INTEGER, 
           label VARCHAR(256), 
           active BOOL, 
           database_id INTEGER, 
           `schema` VARCHAR(256), 
           `sql` TEXT, 
           query_limit INTEGER, 
           latest_query_id VARCHAR(11), 
           autorun BOOL NOT NULL, 
           template_params TEXT, 
           created_by_fk INTEGER, 
           changed_by_fk INTEGER, 
           PRIMARY KEY (id), 
           FOREIGN KEY(changed_by_fk) REFERENCES ab_user (id), 
           FOREIGN KEY(created_by_fk) REFERENCES ab_user (id), 
           FOREIGN KEY(database_id) REFERENCES dbs (id), 
           FOREIGN KEY(latest_query_id) REFERENCES query (client_id), 
           FOREIGN KEY(user_id) REFERENCES ab_user (id), 
           CHECK (active IN (0, 1)), 
           CHECK (autorun IN (0, 1))
   )
   
   ]
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org