mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
48 lines
1.6 KiB
Python
48 lines
1.6 KiB
Python
"""Add providers data to ORM
|
|
|
|
Revision ID: 915b68780108
|
|
Revises: 400501b04bf0
|
|
Create Date: 2025-01-07 10:49:04.717058
|
|
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
import sqlalchemy as sa
|
|
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "915b68780108"
|
|
down_revision: Union[str, None] = "400501b04bf0"
|
|
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(
|
|
"providers",
|
|
sa.Column("name", sa.String(), nullable=False),
|
|
sa.Column("api_key", sa.String(), nullable=True),
|
|
sa.Column("id", sa.String(), nullable=False),
|
|
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=True),
|
|
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=True),
|
|
sa.Column("is_deleted", sa.Boolean(), server_default=sa.text("FALSE"), nullable=False),
|
|
sa.Column("_created_by_id", sa.String(), nullable=True),
|
|
sa.Column("_last_updated_by_id", sa.String(), nullable=True),
|
|
sa.Column("organization_id", sa.String(), nullable=False),
|
|
sa.ForeignKeyConstraint(
|
|
["organization_id"],
|
|
["organizations.id"],
|
|
),
|
|
sa.PrimaryKeyConstraint("id"),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("providers")
|
|
# ### end Alembic commands ###
|