-
Notifications
You must be signed in to change notification settings - Fork 422
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 #3138 from hypothesis/list-group-memberships-in-admin
List group memberships of user in admin interface
- Loading branch information
Showing
3 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
h/migrations/versions/21f87f395e26_add_group_name_index.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,25 @@ | ||
"""Add index to group.name column | ||
Revision ID: 21f87f395e26 | ||
Revises: 0d4755a0d88b | ||
Create Date: 2016-03-24 15:12:59.803179 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '21f87f395e26' | ||
down_revision = '0d4755a0d88b' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
# Creating a concurrent index does not work inside a transaction | ||
op.execute('COMMIT') | ||
op.create_index(op.f('ix__group__name'), 'group', ['name'], | ||
postgresql_concurrently=True) | ||
|
||
|
||
def downgrade(): | ||
op.drop_index(op.f('ix__group__name'), 'group') |
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