forked from inveniosoftware/invenio-communities
-
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.
* closes inveniosoftware/invenio-app-rdm#2186
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
invenio_communities/alembic/ab7c937cdd3f_change_fk_groupid_to_string.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,36 @@ | ||
# | ||
# This file is part of Invenio. | ||
# Copyright (C) 2016-2018 CERN. | ||
# | ||
# Invenio is free software; you can redistribute it and/or modify it | ||
# under the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""Change FK GroupId to string""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "ab7c937cdd3f" | ||
down_revision = "a3f5a8635cbb" | ||
branch_labels = () | ||
depends_on = "8f11b75e0995" | ||
|
||
|
||
def upgrade(): | ||
"""Upgrade database.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("ix_uq_partial_files_object_is_head", table_name="files_object") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
"""Downgrade database.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_index( | ||
"ix_uq_partial_files_object_is_head", | ||
"files_object", | ||
["bucket_id", "key"], | ||
unique=False, | ||
) | ||
# ### 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