mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 23:29:02 +00:00
DB CHANGE: Add uploader ip address to torrent column and show on torrent view page for superadmins.
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.
This commit is contained in:
30
migrations/versions/3001f79b7722_add_torrents.uploader_ip.py
Normal file
30
migrations/versions/3001f79b7722_add_torrents.uploader_ip.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""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 ###
|
||||
Reference in New Issue
Block a user