mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
sqllab: don't hold database deletion because of query reference (#1863)
Let people delete the database even if there are sqllab queries on that database. Instead delete them too. Fix #1848
This commit is contained in:
parent
6732f01cb7
commit
36fad803ed
@ -2591,7 +2591,10 @@ class Query(Model):
|
||||
DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=True)
|
||||
|
||||
database = relationship(
|
||||
'Database', foreign_keys=[database_id], backref='queries')
|
||||
'Database',
|
||||
foreign_keys=[database_id],
|
||||
backref=backref('queries', cascade='all, delete-orphan')
|
||||
)
|
||||
user = relationship(
|
||||
'User',
|
||||
backref=backref('queries', cascade='all, delete-orphan'),
|
||||
|
Loading…
Reference in New Issue
Block a user