Skip to main content
Glama
7cdcec39930b_first.py3.66 kB
"""first Revision ID: 7cdcec39930b Revises: Create Date: 2025-06-09 09:45:34.294562 """ 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 = '7cdcec39930b' down_revision: Union[str, None] = None branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.create_table('clients', sa.Column('id', sa.UUID(), nullable=False), sa.Column('name', sa.String(length=255), nullable=False), sa.Column('description', sa.Text(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('updated_at', sa.DateTime(), nullable=False), sa.Column('is_active', sa.Boolean(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('knowledge_base', sa.Column('id', sa.Integer(), nullable=False), sa.Column('title', sa.String(length=255), nullable=False), sa.Column('content', sa.Text(), nullable=False), sa.Column('category', sa.String(length=100), nullable=True), sa.Column('tags', postgresql.JSONB(astext_type=sa.Text()), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('api_keys', sa.Column('id', sa.Integer(), nullable=False), sa.Column('client_id', sa.UUID(), nullable=False), sa.Column('key_value', sa.String(length=255), nullable=False), sa.Column('name', sa.String(length=255), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('expires_at', sa.DateTime(), nullable=True), sa.Column('is_active', sa.Boolean(), nullable=False), sa.ForeignKeyConstraint(['client_id'], ['clients.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_api_keys_key_value'), 'api_keys', ['key_value'], unique=True) op.create_table('resource_configurations', sa.Column('id', sa.Integer(), nullable=False), sa.Column('client_id', sa.UUID(), nullable=False), sa.Column('resource_name', sa.String(length=255), nullable=False), sa.Column('configuration', postgresql.JSONB(astext_type=sa.Text()), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('updated_at', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['client_id'], ['clients.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('client_id', 'resource_name', name='uq_client_resource') ) op.create_table('tool_configurations', sa.Column('id', sa.Integer(), nullable=False), sa.Column('client_id', sa.UUID(), nullable=False), sa.Column('tool_name', sa.String(length=255), nullable=False), sa.Column('configuration', postgresql.JSONB(astext_type=sa.Text()), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('updated_at', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['client_id'], ['clients.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('client_id', 'tool_name', name='uq_client_tool') ) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_table('tool_configurations') op.drop_table('resource_configurations') op.drop_index(op.f('ix_api_keys_key_value'), table_name='api_keys') op.drop_table('api_keys') op.drop_table('knowledge_base') op.drop_table('clients') # ### end Alembic commands ###

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeorgeStrakhov/mcpeasy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server