Skip to content

Commit 805bf28

Browse files
update open api specs
1 parent 43c224a commit 805bf28

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""add conversations
22
3-
Revision ID: 03d6d6ab0d5f
3+
Revision ID: 913badedfef3
44
Revises: 742123f0933a
5-
Create Date: 2025-04-28 10:57:35.554780+00:00
5+
Create Date: 2025-04-28 11:00:05.988864+00:00
66
77
"""
88

@@ -11,7 +11,7 @@
1111
from sqlalchemy.dialects import postgresql
1212

1313
# revision identifiers, used by Alembic.
14-
revision = "03d6d6ab0d5f"
14+
revision = "913badedfef3"
1515
down_revision = "742123f0933a"
1616
branch_labels = None
1717
depends_on = None
@@ -29,7 +29,7 @@ def upgrade():
2929
),
3030
sa.Column("name", sa.String(), nullable=False),
3131
sa.Column("project_uuid", sa.String(), nullable=True),
32-
sa.Column("user_id", sa.BigInteger(), nullable=True),
32+
sa.Column("user_group_id", sa.BigInteger(), nullable=True),
3333
sa.Column(
3434
"type",
3535
sa.Enum("PROJECT_STATIC", "PROJECT_ANNOTATION", name="conversationtype"),
@@ -63,9 +63,9 @@ def upgrade():
6363
ondelete="CASCADE",
6464
),
6565
sa.ForeignKeyConstraint(
66-
["user_id"],
67-
["users.id"],
68-
name="fk_projects_comments_user_id",
66+
["user_group_id"],
67+
["groups.gid"],
68+
name="fk_conversation_messages_user_primary_gid",
6969
ondelete="SET NULL",
7070
),
7171
sa.PrimaryKeyConstraint("conversation_id"),

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from ._common import RefActions, column_created_datetime, column_modified_datetime
77
from .base import metadata
8+
from .groups import groups
89
from .projects import projects
9-
from .users import users
1010

1111

1212
class ConversationType(enum.Enum):
@@ -42,16 +42,16 @@ class ConversationType(enum.Enum):
4242
index=True,
4343
nullable=True,
4444
),
45-
# NOTE: if the user gets deleted, it sets to null which should be interpreted as "unknown" user
45+
# NOTE: if the user primary group ID gets deleted, it sets to null which should be interpreted as "unknown" user
4646
sa.Column(
47-
"user_id",
47+
"user_group_id",
4848
sa.BigInteger,
4949
sa.ForeignKey(
50-
users.c.id,
51-
name="fk_projects_comments_user_id",
50+
groups.c.gid,
51+
name="fk_conversation_messages_user_primary_gid",
5252
ondelete=RefActions.SET_NULL,
5353
),
54-
doc="user who created the comment",
54+
doc="user primary group ID who created the message",
5555
nullable=True,
5656
),
5757
sa.Column(

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9256,10 +9256,10 @@ components:
92569256
format: uuid
92579257
- type: 'null'
92589258
title: Projectuuid
9259-
userId:
9259+
userGroupId:
92609260
type: integer
92619261
exclusiveMinimum: true
9262-
title: Userid
9262+
title: Usergroupid
92639263
minimum: 0
92649264
type:
92659265
$ref: '#/components/schemas/ConversationType'
@@ -9277,7 +9277,7 @@ components:
92779277
- productName
92789278
- name
92799279
- projectUuid
9280-
- userId
9280+
- userGroupId
92819281
- type
92829282
- created
92839283
- modified

0 commit comments

Comments
 (0)