"""SQLAlchemy model for the 'schema_changes' table in the Home Assistant PostgreSQL database."""

from sqlalchemy import Column, BigInteger, Integer, TIMESTAMP

from .base import Base


class SchemaChanges(Base):
    """SQLAlchemy model for the 'schema_changes' table."""

    __tablename__ = "schema_changes"
    __table_args__ = {"schema": "public"}

    change_id = Column(BigInteger, primary_key=True, autoincrement=True)
    schema_version = Column(Integer, nullable=True)
    changed = Column(TIMESTAMP(timezone=True), nullable=False)
