Skip to content

Commit a56062b

Browse files
committed
first attempt to do migration
1 parent a3f4692 commit a56062b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""introduce data_deleted in projects_to_jobs table
2+
3+
Revision ID: 5b998370916a
4+
Revises: 5679165336c8
5+
Create Date: 2025-08-11 13:58:38.424398+00:00
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
12+
# revision identifiers, used by Alembic.
13+
revision = "5b998370916a"
14+
down_revision = "5679165336c8"
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(
22+
"projects_to_jobs",
23+
sa.Column("storage_data_deleted", sa.Boolean(), nullable=False),
24+
)
25+
# ### end Alembic commands ###
26+
27+
28+
def downgrade():
29+
# ### commands auto generated by Alembic - please adjust! ###
30+
op.drop_column("projects_to_jobs", "storage_data_deleted")
31+
# ### end Alembic commands ###

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
"the relative resource name is shelves/shelf1/jobs/job2, "
2929
"the parent resource name is shelves/shelf1.",
3030
),
31+
sa.Column(
32+
"storage_data_deleted",
33+
sa.Boolean,
34+
nullable=False,
35+
default=False,
36+
doc="Indicates whether the job's S3 data has been actively deleted.",
37+
),
3138
# Composite key (project_uuid, job_parent_resource_name) uniquely identifies very row
3239
sa.UniqueConstraint(
3340
"project_uuid",

0 commit comments

Comments
 (0)