| 12345678910111213141516171819202122 |
- import sqlalchemy as sa
- from alembic import op
- from sqlalchemy.dialects.mysql import DATETIME
- revision = "0008_memory_retention"
- down_revision = "0007_knowledge_memory"
- branch_labels = None
- depends_on = None
- def upgrade():
- op.add_column("memory_profiles", sa.Column("expires_at", DATETIME(fsp=6), nullable=True))
- op.add_column("memory_jobs", sa.Column("model_name", sa.String(128), nullable=True))
- op.add_column("memory_jobs", sa.Column("usage", sa.JSON(), nullable=True))
- op.add_column("memory_jobs", sa.Column("error_code", sa.String(64), nullable=True))
- def downgrade():
- op.drop_column("memory_jobs", "error_code")
- op.drop_column("memory_jobs", "usage")
- op.drop_column("memory_jobs", "model_name")
- op.drop_column("memory_profiles", "expires_at")
|