mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-11-05 09:25:54 +00:00
dd8cb4757e
* 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
45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
"""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 ###
|