Skip to content

Commit 58a37b1

Browse files
authored
New fields (#264)
1 parent dfd05dd commit 58a37b1

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""New diff columns
2+
3+
Revision ID: 05bbef1eec3f
4+
Revises: f8c313f63a36
5+
Create Date: 2024-10-28 07:46:38.865170
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '05bbef1eec3f'
14+
down_revision = 'f8c313f63a36'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.add_column('pipeline_logs', sa.Column('scope_dict_diff_new', sa.JSON(), nullable=True), schema='cognition')
22+
op.add_column('pipeline_logs', sa.Column('record_dict_diff_new', sa.JSON(), nullable=True), schema='cognition')
23+
op.add_column('message', sa.Column('scope_dict_diff_new', sa.JSON(), nullable=True), schema='cognition')
24+
25+
# note that migration of field values is done in cognition
26+
# after the release another one is needed to remove the old columns
27+
28+
# ### end Alembic commands ###
29+
30+
31+
def downgrade():
32+
# ### commands auto generated by Alembic - please adjust! ###
33+
op.drop_column('pipeline_logs', 'record_dict_diff_new', schema='cognition')
34+
op.drop_column('pipeline_logs', 'scope_dict_diff_new', schema='cognition')
35+
op.drop_column('message', 'scope_dict_diff_new', schema='cognition')
36+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)