diff --git a/web/migrations/versions/018e16dad6aa_.py b/web/migrations/versions/018e16dad6aa_.py new file mode 100644 index 00000000000..7a4dd87a190 --- /dev/null +++ b/web/migrations/versions/018e16dad6aa_.py @@ -0,0 +1,38 @@ +########################################################################## +# +# pgAdmin 4 - PostgreSQL Tools +# +# Copyright (C) 2013 - 2026, The pgAdmin Development Team +# This software is released under the PostgreSQL Licence +# +########################################################################## + +""" +Updated id column type to BIGINT. + +Revision ID: 018e16dad6aa +Revises: efbbe5d5862f +Create Date: 2026-01-08 14:37:33.257002 + +""" +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = '018e16dad6aa' +down_revision = 'efbbe5d5862f' +branch_labels = None +depends_on = None + + +def upgrade(): + with op.batch_alter_table("database") as batch_op: + batch_op.alter_column('id', + existing_type=sa.Integer(), + type_=sa.BigInteger(), + nullable=False) + + +def downgrade(): + # pgAdmin only upgrades, downgrade not implemented. + pass diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py index 553758b814f..69b934683dd 100644 --- a/web/pgadmin/model/__init__.py +++ b/web/pgadmin/model/__init__.py @@ -33,7 +33,7 @@ # ########################################################################## -SCHEMA_VERSION = 48 +SCHEMA_VERSION = 49 ########################################################################## # @@ -412,7 +412,7 @@ class Database(db.Model): Define a Database. """ __tablename__ = 'database' - id = db.Column(db.Integer, primary_key=True) + id = db.Column(db.BigInteger, primary_key=True) schema_res = db.Column(db.String(256), nullable=True) server = db.Column( db.Integer,