Skip to content

Commit 5350b3f

Browse files
committed
added last_scheduled datetime
1 parent 13af039 commit 5350b3f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""add last scheduled time
2+
3+
Revision ID: 1be37720e832
4+
Revises: 8e1f83486be7
5+
Create Date: 2024-11-15 16:12:08.825985+00:00
6+
7+
"""
8+
import sqlalchemy as sa
9+
from alembic import op
10+
11+
# revision identifiers, used by Alembic.
12+
revision = "1be37720e832"
13+
down_revision = "8e1f83486be7"
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",
22+
sa.Column("last_scheduled", sa.DateTime(timezone=True), nullable=True),
23+
)
24+
# ### end Alembic commands ###
25+
26+
27+
def downgrade():
28+
# ### commands auto generated by Alembic - please adjust! ###
29+
op.drop_column("comp_runs", "last_scheduled")
30+
# ### end Alembic commands ###

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
""" Computational Runs Table
22
33
"""
4+
45
import sqlalchemy as sa
56
from sqlalchemy.dialects.postgresql import JSONB
67
from sqlalchemy.sql import func
@@ -105,6 +106,12 @@
105106
nullable=True,
106107
doc="If filled, when cancellation was requested",
107108
),
109+
sa.Column(
110+
"last_scheduled",
111+
sa.DateTime(timezone=True),
112+
nullable=True,
113+
doc="last time the pipeline was scheduled",
114+
),
108115
sa.Column("metadata", JSONB, nullable=True, doc="the run optional metadata"),
109116
sa.Column(
110117
"use_on_demand_clusters",

0 commit comments

Comments
 (0)