mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-11-01 04:35:54 +00:00
9af778217b
Added migration script!: remove sukebei_ lines if your local db does not have those. Show users ip address on user page for superadmins. Rename Admin to Moderator internally. Moderators can now change user level to trusted. Superadmins can make users moderator. Improve changing user level.
31 lines
827 B
Python
31 lines
827 B
Python
"""Add uploader_ip column to torrents table.
|
|
|
|
Revision ID: 3001f79b7722
|
|
Revises:
|
|
Create Date: 2017-05-21 18:01:35.472717
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '3001f79b7722'
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('nyaa_torrents', sa.Column('uploader_ip', sa.Binary(), nullable=True))
|
|
op.add_column('sukebei_torrents', sa.Column('uploader_ip', sa.Binary(), nullable=True))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('nyaa_torrents', 'uploader_ip')
|
|
op.drop_column('sukebei_torrents', 'uploader_ip')
|
|
# ### end Alembic commands ###
|