pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\adala\AppData\Roaming\pgadmin4\config.json"
Webapp Path: "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgAdmin4.py"
pgAdmin Command: "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgAdmin4.py"
Environment: 
  - ALLUSERSPROFILE: C:\ProgramData
  - APPDATA: C:\Users\adala\AppData\Roaming
  - ChocolateyInstall: C:\ProgramData\chocolatey
  - ChocolateyLastPathUpdate: 133697579776566095
  - CommonProgramFiles: C:\Program Files\Common Files
  - CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
  - CommonProgramW6432: C:\Program Files\Common Files
  - COMPUTERNAME: ADAM
  - ComSpec: C:\Windows\system32\cmd.exe
  - DriverData: C:\Windows\System32\Drivers\DriverData
  - ELECTRON_ENABLE_SECURITY_WARNINGS: false
  - HOMEDRIVE: C:
  - HOMEPATH: \Users\adala
  - LOCALAPPDATA: C:\Users\adala\AppData\Local
  - LOGONSERVER: \\ADAM
  - NUMBER_OF_PROCESSORS: 32
  - OneDrive: C:\Users\adala\OneDrive
  - OneDriveConsumer: C:\Users\adala\OneDrive
  - ORIGINAL_XDG_CURRENT_DESKTOP: undefined
  - OS: Windows_NT
  - Path: C:\Program Files\PostgreSQL\17\pgAdmin 4\runtime;C:\Python312\Scripts\;C:\Python312\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\GitExtensions\;C:\Users\adala\AppData\Local\Microsoft\WindowsApps;C:\Users\adala\.dotnet\tools;C:\Users\adala\AppData\Local\Microsoft\WinGet\Links;C:\Users\adala\AppData\Roaming\npm;C:\Users\adala\AppData\Roaming\Programs\Zero Install;C:\Users\adala\.dotnet\tools
  - PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
  - PGADMIN_INT_KEY: ea4306e4-b956-4e5f-8d8b-1e40d313c0c8
  - PGADMIN_INT_PORT: 64460
  - PGADMIN_SERVER_MODE: OFF
  - PM2_HOME: C:\Users\adala\.pm2
  - PM2_SERVICE_PM2_DIR: C:\USERS\ADALA\APPDATA\ROAMING\NPM\node_modules\pm2\index.js
  - PM2_SERVICE_SCRIPTS: y
  - PROCESSOR_ARCHITECTURE: AMD64
  - PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
  - PROCESSOR_LEVEL: 6
  - PROCESSOR_REVISION: b701
  - ProgramData: C:\ProgramData
  - ProgramFiles: C:\Program Files
  - ProgramFiles(x86): C:\Program Files (x86)
  - ProgramW6432: C:\Program Files
  - PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
  - PUBLIC: C:\Users\Public
  - SET_PM2_HOME: true
  - SET_PM2_SERVICE_PM2_DIR: true
  - SET_PM2_SERVICE_SCRIPTS: true
  - SystemDrive: C:
  - SystemRoot: C:\Windows
  - TEMP: C:\Users\adala\AppData\Local\Temp
  - TMP: C:\Users\adala\AppData\Local\Temp
  - USERDOMAIN: ADAM
  - USERDOMAIN_ROAMINGPROFILE: ADAM
  - USERNAME: adala
  - USERPROFILE: C:\Users\adala
  - windir: C:\Windows
  - ZES_ENABLE_SYSMAN: 1
--------------------------------------------------------

Total spawn time to start the pgAdmin4 server: 0.016 Sec
2024-09-24 10:51:12,539: ERROR	pgadmin:	Database migration failed

2024-09-24 10:51:12,543: ERROR	pgadmin:	Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 690, in drop_constraint
    const = self.named_constraints.pop(const.name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 386, in upgrade_db
    db_upgrade(app)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 111, in wrapped
    f(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 200, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 406, in upgrade
    script.run_env()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 582, in run_env
    util.load_python_file(self.dir, "env.py")
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 95, in <module>
    run_migrations_online()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 87, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 946, in run_migrations
    self.get_context().run_migrations(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 628, in run_migrations
    step.migration_fn(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\migrations\versions\7c56ea250085_.py", line 26, in upgrade
    with op.batch_alter_table("server") as batch_op:
  File "contextlib.py", line 144, in __exit__
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 398, in batch_alter_table
    impl.flush()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 162, in flush
    fn(*arg, **kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 701, in drop_constraint
    raise ValueError("No such constraint: '%s'" % const.name)
ValueError: No such constraint: 'ck_port_range'


2024-09-24 10:51:12,544: ERROR	pgadmin:	Exception in database migration.

contextlib.py:144: SAWarning: WARNING: SQL-parsed foreign key constraint '('user_id', 'user', 'id')' could not be located in PRAGMA foreign_keys for table server

contextlib.py:144: SAWarning: WARNING: SQL-parsed foreign key constraint '('servergroup_id', 'servergroup', 'id')' could not be located in PRAGMA foreign_keys for table server

2024-09-24 10:51:12,881: ERROR	pgadmin:	Database migration failed

2024-09-24 10:51:12,884: ERROR	pgadmin:	Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 690, in drop_constraint
    const = self.named_constraints.pop(const.name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 386, in upgrade_db
    db_upgrade(app)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 111, in wrapped
    f(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 200, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 406, in upgrade
    script.run_env()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 582, in run_env
    util.load_python_file(self.dir, "env.py")
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 95, in <module>
    run_migrations_online()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 87, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 946, in run_migrations
    self.get_context().run_migrations(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 628, in run_migrations
    step.migration_fn(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\migrations\versions\7c56ea250085_.py", line 26, in upgrade
    with op.batch_alter_table("server") as batch_op:
  File "contextlib.py", line 144, in __exit__
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 398, in batch_alter_table
    impl.flush()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 162, in flush
    fn(*arg, **kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 701, in drop_constraint
    raise ValueError("No such constraint: '%s'" % const.name)
ValueError: No such constraint: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 690, in drop_constraint
    const = self.named_constraints.pop(const.name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 372, in backup_db_file
    db_upgrade(app)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 111, in wrapped
    f(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 200, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 406, in upgrade
    script.run_env()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 582, in run_env
    util.load_python_file(self.dir, "env.py")
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 95, in <module>
    run_migrations_online()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 87, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 946, in run_migrations
    self.get_context().run_migrations(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 628, in run_migrations
    step.migration_fn(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\migrations\versions\a77a0932a568_.py", line 28, in upgrade
    with op.batch_alter_table("server") as batch_op:
  File "contextlib.py", line 144, in __exit__
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 398, in batch_alter_table
    impl.flush()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 162, in flush
    fn(*arg, **kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 701, in drop_constraint
    raise ValueError("No such constraint: '%s'" % const.name)
ValueError: No such constraint: 'ck_port_range'

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 690, in drop_constraint

NOTE: Configuring authentication for DESKTOP mode.
NOTE: Configuring authentication for DESKTOP mode.

    const = self.named_constraints.pop(const.name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 386, in upgrade_db
    db_upgrade(app)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 111, in wrapped
    f(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 200, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 406, in upgrade

    script.run_env()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 582, in run_env
    util.load_python_file(self.dir, "env.py")
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 95, in <module>
    run_migrations_online()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 87, in run_migrations_online

    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 946, in run_migrations
    self.get_context().run_migrations(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 628, in run_migrations

    step.migration_fn(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\migrations\versions\7c56ea250085_.py", line 26, in upgrade
    with op.batch_alter_table("server") as batch_op:
  File "contextlib.py", line 144, in __exit__

  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 398, in batch_alter_table
    impl.flush()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 162, in flush

    fn(*arg, **kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 701, in drop_constraint
    raise ValueError("No such constraint: '%s'" % const.name)
ValueError: No such constraint: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 690, in drop_constraint

    const = self.named_constraints.pop(const.name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 372, in backup_db_file
    db_upgrade(app)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 111, in wrapped

    f(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\flask_migrate\__init__.py", line 200, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 406, in upgrade

    script.run_env()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 582, in run_env
    util.load_python_file(self.dir, "env.py")
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py

    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 95, in <module>
    run_migrations_online()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\setup\..\..\migrations\env.py", line 87, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 946, in run_migrations

    self.get_context().run_migrations(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 628, in run_migrations
    step.migration_fn(**kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\migrations\versions\a77a0932a568_.py", line 28, in upgrade

    with op.batch_alter_table("server") as batch_op:
  File "contextlib.py", line 144, in __exit__
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 398, in batch_alter_table

    impl.flush()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 162, in flush
    fn(*arg, **kw)
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\python\Lib\site-packages\alembic\operations\batch.py", line 701, in drop_constraint
    raise ValueError("No such constraint: '%s'" % const.name)

ValueError: No such constraint: 'ck_port_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgAdmin4.py", line 103, in <module>
    app = create_app()
          ^^^^^^^^^^^^
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 473, in create_app

    run_migration_for_sqlite()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 410, in run_migration_for_sqlite
    upgrade_db()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 391, in upgrade_db

    backup_db_file()
  File "C:\Program Files\PostgreSQL\17\pgAdmin 4\web\pgadmin\__init__.py", line 379, in backup_db_file
    raise RuntimeError('Migration failed')
RuntimeError: Migration failed

Jak to naprawić? Mam to przy uruchamianiu pgAdmin.