05/19 Enhance codes 2
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""add expires_at to shared_items
|
||||
|
||||
Revision ID: i9j0k1l2m3n4
|
||||
Revises: h8i9j0k1l2m3
|
||||
Create Date: 2026-05-19 00:00:00.000000
|
||||
|
||||
Adds an optional expiry timestamp to shared items.
|
||||
- NULL = share never expires (backwards compatible with existing rows)
|
||||
- value = share is considered expired after this datetime
|
||||
|
||||
Expired unaccepted shares are filtered from the recipient's inbox.
|
||||
Expired accepted shares remain visible (data already accepted into vault).
|
||||
The APScheduler cleanup job deletes expired unaccepted shares nightly.
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = 'i9j0k1l2m3n4'
|
||||
down_revision = 'h8i9j0k1l2m3'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
'shared_items',
|
||||
sa.Column('expires_at', sa.DateTime, nullable=True),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('shared_items', 'expires_at')
|
||||
Reference in New Issue
Block a user