Skip to content

Commit 3f11102

Browse files
committed
added cancellation mark
1 parent 1564d50 commit 3f11102

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""add cancellation mark
2+
3+
Revision ID: 8bfe65a5e294
4+
Revises: 5ad02358751a
5+
Create Date: 2024-11-08 14:40:59.266181+00:00
6+
7+
"""
8+
import sqlalchemy as sa
9+
from alembic import op
10+
11+
# revision identifiers, used by Alembic.
12+
revision = "8bfe65a5e294"
13+
down_revision = "5ad02358751a"
14+
branch_labels = None
15+
depends_on = None
16+
17+
18+
def upgrade():
19+
# ### commands auto generated by Alembic - please adjust! ###
20+
op.add_column(
21+
"comp_runs", sa.Column("cancelled", sa.DateTime(timezone=True), nullable=True)
22+
)
23+
# ### end Alembic commands ###
24+
25+
26+
def downgrade():
27+
# ### commands auto generated by Alembic - please adjust! ###
28+
op.drop_column("comp_runs", "cancelled")
29+
# ### end Alembic commands ###

packages/postgres-database/src/simcore_postgres_database/models/comp_runs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@
9999
nullable=True,
100100
doc="When the run was finished",
101101
),
102+
sa.Column(
103+
"cancelled",
104+
sa.DateTime(timezone=True),
105+
nullable=True,
106+
doc="If filled, when cancellation was requested",
107+
),
102108
sa.Column("metadata", JSONB, nullable=True, doc="the run optional metadata"),
103109
sa.Column(
104110
"use_on_demand_clusters",

0 commit comments

Comments
 (0)