Skip to content

Commit 3ef31dd

Browse files
committed
adds flags
1 parent 46259c4 commit 3ef31dd

File tree

3 files changed

+18
-32
lines changed

3 files changed

+18
-32
lines changed

packages/postgres-database/src/simcore_postgres_database/migration/versions/2f7a267fd7d8_new_folders_trashed_at.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sqlalchemy as sa
2+
from sqlalchemy.sql import expression
23

34
from ._common import column_created_datetime, column_modified_datetime
45
from .base import metadata
@@ -78,6 +79,13 @@
7879
"trashed_at",
7980
sa.DateTime(timezone=True),
8081
nullable=True,
81-
doc="Timestamp indicating when the folder was marked as trashed, or null otherwise.",
82+
doc="The date and time when the folder was marked as trashed. Null if the folder has not been trashed.",
83+
),
84+
sa.Column(
85+
"trashed_explicitly",
86+
sa.Boolean,
87+
nullable=False,
88+
server_default=expression.false(),
89+
doc="Indicates whether the folder was explicitly trashed by the user (true) or inherited its trashed status from a parent (false).",
8290
),
8391
)

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import sqlalchemy as sa
77
from sqlalchemy.dialects.postgresql import ARRAY, JSONB
8-
from sqlalchemy.sql import func
8+
from sqlalchemy.sql import expression, func
99

1010
from .base import metadata
1111

@@ -145,7 +145,14 @@ class ProjectType(enum.Enum):
145145
"trashed_at",
146146
sa.DateTime(timezone=True),
147147
nullable=True,
148-
doc="Timestamp indicating when the project was marked as trashed, or null otherwise.",
148+
doc="The date and time when the project was marked as trashed. Null if the project has not been trashed.",
149+
),
150+
sa.Column(
151+
"trashed_explicitly",
152+
sa.Boolean,
153+
nullable=False,
154+
server_default=expression.false(),
155+
doc="Indicates whether the project was explicitly trashed by the user (true) or inherited its trashed status from a parent (false).",
149156
),
150157
sa.Column(
151158
"workspace_id",

0 commit comments

Comments
 (0)