1
0
Fork 0
mirror of https://github.com/EDeev/mospolytech-mcp.git synced 2026-10-07 20:49:52 +03:00
mospolytech-mcp/alembic/versions/d3ae49746cfb_create_groups_cache.py
2026-09-16 21:09:41 +03:00

37 lines
1.1 KiB
Python

"""create groups_cache
Revision ID: d3ae49746cfb
Revises:
Create Date: 2026-09-15 18:20:07.435834
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision: str = 'd3ae49746cfb'
down_revision: Union[str, Sequence[str], None] = None
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('groups_cache',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('groups', postgresql.JSONB(astext_type=sa.Text()), nullable=False),
sa.Column('fetched_at', sa.DateTime(timezone=True), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('groups_cache')
# ### end Alembic commands ###