mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
35 lines
967 B
Python
35 lines
967 B
Python
"""instance admins
|
|
|
|
Revision ID: 75f5b458c2f9
|
|
Revises: a8fc7f7ba539
|
|
Create Date: 2024-02-14 11:12:09.271117
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '75f5b458c2f9'
|
|
down_revision = 'a8fc7f7ba539'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('instance_role',
|
|
sa.Column('instance_id', sa.Integer(), nullable=False),
|
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
|
sa.Column('role', sa.String(length=50), nullable=True),
|
|
sa.ForeignKeyConstraint(['instance_id'], ['instance.id'], ),
|
|
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
|
sa.PrimaryKeyConstraint('instance_id', 'user_id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('instance_role')
|
|
# ### end Alembic commands ###
|