mirror of
https://git.0x0.st/mia/0x0.git
synced 2025-04-20 07:03:03 +02:00
SUPPLEMENTALLY: - Add an `expiration` field to the `file` table of the database - Produce a migration for the above change - Overhaul the cleanup script, and integrate into fhost.py (now run using FLASK_APP=fhost flask prune) - Replace the old cleanup script with a deprecation notice - Add information about how to expire files to the index - Update the README with information about the new script
22 lines
433 B
Python
22 lines
433 B
Python
"""add file expirations [creates legacy files]
|
|
|
|
Revision ID: 939a08e1d6e5
|
|
Revises: 7e246705da6a
|
|
Create Date: 2022-11-22 12:16:32.517184
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '939a08e1d6e5'
|
|
down_revision = '7e246705da6a'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('file', sa.Column('expiration', sa.BigInteger()))
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('file', 'expiration')
|