2018-08-29 07:14:37 -05:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2024-01-01 02:43:48 -06:00
|
|
|
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
2018-08-29 07:14:37 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
"""
|
|
|
|
Deleting old debug logs
|
|
|
|
|
|
|
|
Revision ID: ca00ec32581b
|
|
|
|
Revises: aa86fb60b73d
|
|
|
|
Create Date: 2018-08-29 15:33:57.855491
|
|
|
|
|
|
|
|
"""
|
2022-10-20 05:48:41 -05:00
|
|
|
from alembic import op
|
|
|
|
from sqlalchemy.orm.session import Session
|
|
|
|
from pgadmin.model import DebuggerFunctionArguments
|
2018-08-29 07:14:37 -05:00
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'ca00ec32581b'
|
|
|
|
down_revision = 'aa86fb60b73d'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
2022-10-20 05:48:41 -05:00
|
|
|
session = Session(bind=op.get_bind())
|
|
|
|
|
|
|
|
debugger_records = session.query(DebuggerFunctionArguments).all()
|
|
|
|
if debugger_records:
|
|
|
|
session.delete(debugger_records)
|
2018-08-29 07:14:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
2020-07-24 01:16:30 -05:00
|
|
|
# pgAdmin only upgrades, downgrade not implemented.
|
2018-08-29 07:14:37 -05:00
|
|
|
pass
|