Skip to content

Commit

Permalink
models: name Boolean constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
fenekku authored and lnielsen committed Jun 1, 2020
1 parent 25ca603 commit 7af152b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions invenio_communities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ class CommunityMetadata(db.Model, RecordMetadataBase):
__table_args__ = {'extend_existing': True}
__versioned__ = {'versioning': False}

is_deleted = db.Column(db.Boolean, nullable=True, default=False)
"""Time at which the community was soft-deleted."""
is_deleted = db.Column(
db.Boolean(name="ck_communities_community_metadata_is_deleted"),
nullable=True,
default=False
)
"""Was the community soft-deleted."""

def delete(self):
"""Mark the community for deletion."""
Expand Down

0 comments on commit 7af152b

Please sign in to comment.