mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Merge pull request #2529 from alphagov/add-expiry-date-to-constraint
Allow api_keys names to be reused
This commit is contained in:
@@ -748,7 +748,7 @@ class ApiKey(db.Model, Versioned):
|
||||
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
|
||||
|
||||
__table_args__ = (
|
||||
UniqueConstraint('service_id', 'name', name='uix_service_to_key_name'),
|
||||
Index('uix_service_to_key_name', 'service_id', 'name', unique=True, postgresql_where=expiry_date.is_(None)),
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user