-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Easier way to add volunteer role admins
- Loading branch information
Showing
4 changed files
with
48 additions
and
3 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
36 changes: 36 additions & 0 deletions
36
migrations/versions/4dcd2eba5f2c_volunteerroleadminsetting.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 @@ | ||
"""VolunteerRoleAdminSetting | ||
Revision ID: 4dcd2eba5f2c | ||
Revises: e9529c62ca57 | ||
Create Date: 2024-05-14 01:00:14.114990 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '4dcd2eba5f2c' | ||
down_revision = 'e9529c62ca57' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('volunteer_role_admin_version', | ||
sa.Column('user_id', sa.Integer(), autoincrement=False, nullable=False), | ||
sa.Column('role_id', sa.Integer(), autoincrement=False, nullable=False), | ||
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False), | ||
sa.Column('operation_type', sa.SmallInteger(), nullable=False), | ||
sa.PrimaryKeyConstraint('user_id', 'role_id', 'transaction_id', name=op.f('pk_volunteer_role_admin_version')) | ||
) | ||
op.create_index(op.f('ix_volunteer_role_admin_version_operation_type'), 'volunteer_role_admin_version', ['operation_type'], unique=False) | ||
op.create_index(op.f('ix_volunteer_role_admin_version_transaction_id'), 'volunteer_role_admin_version', ['transaction_id'], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_volunteer_role_admin_version_transaction_id'), table_name='volunteer_role_admin_version') | ||
op.drop_index(op.f('ix_volunteer_role_admin_version_operation_type'), table_name='volunteer_role_admin_version') | ||
op.drop_table('volunteer_role_admin_version') | ||
# ### 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
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