forked from galaxyproject/galaxy
-
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 galaxyproject#18966 from jdavcs/dev_private_roles2
Decouple user email from role name
- Loading branch information
Showing
18 changed files
with
415 additions
and
107 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
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
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
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
40 changes: 40 additions & 0 deletions
40
...l/migrations/alembic/versions_gxy/9a5207190a4d_remove_unique_constraint_from_role_name.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,40 @@ | ||
"""Remove unique constraint from role name, add not null constraint | ||
Revision ID: 9a5207190a4d | ||
Revises: a99a5b52ccb8 | ||
Create Date: 2024-10-08 14:08:28.418055 | ||
""" | ||
|
||
from galaxy.model.database_object_names import build_index_name | ||
from galaxy.model.migrations.util import ( | ||
alter_column, | ||
create_index, | ||
drop_index, | ||
transaction, | ||
) | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "9a5207190a4d" | ||
down_revision = "a99a5b52ccb8" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
table_name = "role" | ||
column_name = "name" | ||
index_name = build_index_name(table_name, [column_name]) | ||
|
||
|
||
def upgrade(): | ||
with transaction(): | ||
drop_index(index_name, table_name) | ||
alter_column(table_name, column_name, nullable=False) | ||
create_index(index_name, table_name, [column_name]) | ||
|
||
|
||
def downgrade(): | ||
with transaction(): | ||
drop_index(index_name, table_name) | ||
alter_column(table_name, column_name, nullable=True) | ||
create_index(index_name, table_name, [column_name], unique=True) |
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
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
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
Oops, something went wrong.