mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure servers are deleted when their parent group is deleted. Fixes #2212
This commit is contained in:
parent
af499c0c9a
commit
da186ea77b
@ -124,7 +124,9 @@ class Server(db.Model):
|
||||
nullable=False)
|
||||
comment = db.Column(db.String(1024), nullable=True)
|
||||
discovery_id = db.Column(db.String(128), nullable=True)
|
||||
|
||||
servers = db.relationship('ServerGroup',
|
||||
backref=db.backref('server', cascade="all, delete-orphan"),
|
||||
lazy='joined')
|
||||
|
||||
class ModulePreference(db.Model):
|
||||
"""Define a preferences table for any modules."""
|
||||
|
Loading…
Reference in New Issue
Block a user