GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
28 lines
982 B
Python
28 lines
982 B
Python
"""Add dataset storage metadata columns."""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = "202601120001"
|
|
down_revision = "202601110001"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("datasets", sa.Column("original_filename", sa.Text(), nullable=True))
|
|
op.add_column("datasets", sa.Column("stored_filename", sa.Text(), nullable=True))
|
|
op.add_column("datasets", sa.Column("content_type", sa.Text(), nullable=True))
|
|
op.add_column("datasets", sa.Column("size_bytes", sa.Integer(), nullable=True))
|
|
op.add_column("datasets", sa.Column("checksum_sha256", sa.Text(), nullable=True))
|
|
op.alter_column("datasets", "status", server_default="uploaded")
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("datasets", "checksum_sha256")
|
|
op.drop_column("datasets", "size_bytes")
|
|
op.drop_column("datasets", "content_type")
|
|
op.drop_column("datasets", "stored_filename")
|
|
op.drop_column("datasets", "original_filename")
|