-
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.
Merge pull request #1411 from microbiomedata/1410-bulk-download-assoc…
…iation-index Create index on download/data object association
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
nmdc_server/migrations/versions/2ec2d0b4f840_create_data_object_id_idx.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,34 @@ | ||
"""Create index on column `data_object_id` for table `bulk_download_data_object` | ||
Revision ID: 2ec2d0b4f840 | ||
Revises: 5fb9910ca8e6 | ||
Create Date: 2024-10-10 16:48:37.051479 | ||
""" | ||
|
||
from typing import Optional | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "2ec2d0b4f840" | ||
down_revision: Optional[str] = "5fb9910ca8e6" | ||
branch_labels: Optional[str] = None | ||
depends_on: Optional[str] = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_index( | ||
"bulk_download_data_object_id_idx", | ||
"bulk_download_data_object", | ||
["data_object_id"], | ||
unique=False, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("bulk_download_data_object_id_idx", table_name="bulk_download_data_object") | ||
# ### 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