forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Add index to checksum (ITISFoundation#5748)
- Loading branch information
1 parent
df75228
commit b4bab34
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...se/src/simcore_postgres_database/migration/versions/1c069f85d5fd_add_index_to_checksum.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,5 +54,6 @@ | |
nullable=True, | ||
server_default=sa.null(), | ||
doc="SHA256 checksum of the file content", | ||
index=True, | ||
), | ||
) |