"""auto update

Revision ID: 2b37c4be0bdb
Revises: 2fad4842eebe
Create Date: 2026-05-02 04:49:54.940037

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '2b37c4be0bdb'
down_revision: Union[str, Sequence[str], None] = '2fad4842eebe'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('kb_article_feedback',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('article_id', sa.String(), nullable=False),
    sa.Column('category_id', sa.String(), nullable=True),
    sa.Column('rating', sa.String(), nullable=False),
    sa.Column('comment', sa.String(length=2000), nullable=True),
    sa.Column('user_id', sa.String(), nullable=True),
    sa.Column('user_email', sa.String(length=255), nullable=True),
    sa.Column('page_url', sa.String(length=500), nullable=True),
    sa.Column('user_agent', sa.String(length=500), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=True),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_kb_article_feedback_id'), 'kb_article_feedback', ['id'], unique=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_kb_article_feedback_id'), table_name='kb_article_feedback')
    op.drop_table('kb_article_feedback')
    # ### end Alembic commands ###