mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 23:29:02 +00:00
Admin Log 2.0 (#283)
* Admin log added * Add admin log to top bar * Fixed some admin log bugs * Remove comment_id column because comments die when they are killed * Fix tabs in admin log template * Fixed sort of admin logs to be created_time desc * Fix navbar wrapping to a new line when 992px <= width <= 1200px * Put reports and admin log in "Admin" dropdown Applied ./lint.sh fixes Fixed long lines * Updated log to be text instead of id based to account for future deletions * Small fix in log message formatting
This commit is contained in:
44
migrations/versions/1add911660a6_admin_log_added.py
Normal file
44
migrations/versions/1add911660a6_admin_log_added.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""Admin log added
|
||||
|
||||
Revision ID: 1add911660a6
|
||||
Revises: 7f064e009cab
|
||||
Create Date: 2017-06-29 02:57:39.715965
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1add911660a6'
|
||||
down_revision = '7f064e009cab'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('nyaa_adminlog',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('created_time', sa.DateTime(), nullable=True),
|
||||
sa.Column('log', sa.String(length=1024), nullable=False),
|
||||
sa.Column('admin_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['admin_id'], ['users.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('sukebei_adminlog',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('created_time', sa.DateTime(), nullable=True),
|
||||
sa.Column('log', sa.String(length=1024), nullable=False),
|
||||
sa.Column('admin_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['admin_id'], ['users.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('sukebei_adminlog')
|
||||
op.drop_table('nyaa_adminlog')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user