diff --git a/web/migrations/versions/9426ad06a63b_.py b/web/migrations/versions/9426ad06a63b_.py index c90bd42a1..ea825de7c 100644 --- a/web/migrations/versions/9426ad06a63b_.py +++ b/web/migrations/versions/9426ad06a63b_.py @@ -13,7 +13,7 @@ Revision ID: 9426ad06a63b Revises: f656e56dfdc8 Create Date: 2023-10-09 15:09:50.773035 """ -from alembic import op +from alembic import op, context import sqlalchemy as sa @@ -31,7 +31,8 @@ def upgrade(): # batch_alter_table with op.batch_alter_table( "server", table_kwargs={'sqlite_autoincrement': True}) as batch_op: - batch_op.alter_column('id', autoincrement=True) + if context.get_impl().bind.dialect.name == "sqlite": + batch_op.alter_column('id', autoincrement=True) batch_op.add_column(sa.Column('shared_username', sa.String(64), nullable=True)) diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py index e3f566e17..7c2e51a4f 100644 --- a/web/pgadmin/tools/debugger/__init__.py +++ b/web/pgadmin/tools/debugger/__init__.py @@ -1844,7 +1844,7 @@ def set_arguments_sqlite(sid, did, scid, func_id): for i in range(0, len(data)): dbg_func_args_exists = int( DebuggerFunctionArguments.query.filter_by( - server_id=data[i]['server_id'], + server_id=int(data[i]['server_id']), database_id=data[i]['database_id'], schema_id=data[i]['schema_id'], function_id=data[i]['function_id'], @@ -1863,7 +1863,7 @@ def set_arguments_sqlite(sid, did, scid, func_id): # existing value otherwise add the new value if dbg_func_args_exists: dbg_func_args = DebuggerFunctionArguments.query.filter_by( - server_id=data[i]['server_id'], + server_id=int(data[i]['server_id']), database_id=data[i]['database_id'], schema_id=data[i]['schema_id'], function_id=data[i]['function_id'], @@ -1876,7 +1876,7 @@ def set_arguments_sqlite(sid, did, scid, func_id): dbg_func_args.value = array_string else: debugger_func_args = DebuggerFunctionArguments( - server_id=data[i]['server_id'], + server_id=int(data[i]['server_id']), database_id=data[i]['database_id'], schema_id=data[i]['schema_id'], function_id=data[i]['function_id'],