combine 5 different post/comment filter state adjustment routes (#637)

This commit is contained in:
justcool393 2023-07-22 17:34:08 -07:00 committed by GitHub
parent 2edaec6933
commit 672745ee6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 126 additions and 289 deletions

View file

@ -0,0 +1,25 @@
"""Rename approve mod actions
Revision ID: a23fe2f1515c
Revises: 7ae4658467d7
Create Date: 2023-07-22 14:37:20.485816+00:00
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = 'a23fe2f1515c'
down_revision = '7ae4658467d7'
branch_labels = None
depends_on = None
def upgrade():
op.execute("UPDATE modactions SET kind='approve_post' WHERE kind='unremove_post';")
op.execute("UPDATE modactions SET kind='approve_comment' WHERE kind='unremove_comment';")
def downgrade():
op.execute("UPDATE modactions SET kind='unremove_post' WHERE kind='approve_post';")
op.execute("UPDATE modactions SET kind='unremove_comment' WHERE kind='approve_comment';")