Skip to content

Commit

Permalink
🐛 Add index to checksum (ITISFoundation#5748)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Apr 26, 2024
1 parent df75228 commit b4bab34
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""add index to checksum
Revision ID: 1c069f85d5fd
Revises: b13ca15c7ef8
Create Date: 2024-04-26 11:46:55.745033+00:00
"""
from alembic import op

# revision identifiers, used by Alembic.
revision = "1c069f85d5fd"
down_revision = "b13ca15c7ef8"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_index(
op.f("ix_file_meta_data_sha256_checksum"),
"file_meta_data",
["sha256_checksum"],
unique=False,
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(
op.f("ix_file_meta_data_sha256_checksum"), table_name="file_meta_data"
)
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@
nullable=True,
server_default=sa.null(),
doc="SHA256 checksum of the file content",
index=True,
),
)

0 comments on commit b4bab34

Please sign in to comment.