Skip to content

Commit 7e870ad

Browse files
committed
doc something
1 parent 4aedb35 commit 7e870ad

20 files changed

+262
-64
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
""" User's confirmations table
1+
"""User's confirmations table
22
3-
- Keeps a list of tokens to identify an action (registration, invitation, reset, etc) authorized
4-
by link to a a user in the framework
5-
- These tokens have an expiration date defined by configuration
3+
- Keeps a list of tokens to identify an action (registration, invitation, reset, etc) authorized
4+
by link to a a user in the framework
5+
- These tokens have an expiration date defined by configuration
66
7+
Migration strategy:
8+
- The primary key is `code`, which is unique and sufficient for migration.
9+
- Ensure `user_id` foreign key references are valid in the target database.
10+
- No additional changes are required; this table can be migrated as is.
711
"""
12+
813
import enum
914

1015
import sqlalchemy as sa

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
""" Groups table
1+
"""Groups table
22
3-
- List of groups in the framework
4-
- Groups have a ID, name and a list of users that belong to the group
5-
"""
3+
- Represents user groups in the system.
64
5+
Migration strategy:
6+
- The primary key is `id`, which is unique and sufficient for migration.
7+
- Ensure foreign key references (if any) are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
9+
"""
710

811
import sqlalchemy as sa
912
from common_library.groups_enums import GroupType

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
""" Collection of jinja2 templates for customizable docs (e.g. emails, sites)
1+
"""Jinja2 templates table
22
3+
- Collection of jinja2 templates for customizable docs (e.g. emails, sites)
4+
5+
Migration strategy:
6+
- The primary key is `id`, which is unique and sufficient for migration.
7+
- No foreign key dependencies exist.
8+
- No additional changes are required; this table can be migrated as is.
39
"""
410

511
import sqlalchemy as sa

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
"""Products table
22
3+
- Represents products in the system.
34
- List of products served by the simcore platform
45
- Products have a name and an associated host (defined by a regex)
56
- Every product has a front-end with exactly the same name
7+
8+
Migration strategy:
9+
- The primary key is `id`, which is unique and sufficient for migration.
10+
- Ensure foreign key references (if any) are valid in the target database.
611
"""
712

813
import json
@@ -122,6 +127,7 @@ class ProductLoginSettingsDict(TypedDict, total=False):
122127
# NOTE: a default entry is created in the table Product
123128
# see packages/postgres-database/src/simcore_postgres_database/migration/versions/350103a7efbd_modified_products_table.py
124129

130+
125131
products = sa.Table(
126132
"products",
127133
metadata,

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""Products to templates table
2+
3+
- Links products to Jinja2 templates.
4+
5+
Migration strategy:
6+
- Composite primary key (`product_id`, `template_id`) is unique and sufficient for migration.
7+
- Ensure foreign key references to `products` and `jinja2_templates` are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
9+
"""
10+
111
import sqlalchemy as sa
212

313
from ._common import (

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
""" Projects table
1+
"""Projects table
22
3+
- Represents user projects in the system.
4+
5+
Migration strategy:
6+
- The primary key is `id`, which is unique and sufficient for migration.
7+
- Ensure foreign key references (if any) are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
39
"""
10+
411
import enum
512

613
import sqlalchemy as sa

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""Projects comments table
2+
3+
- Stores comments associated with projects.
4+
5+
Migration strategy:
6+
- The primary key is `id`, which is unique and sufficient for migration.
7+
- Ensure foreign key references to `projects` are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
9+
"""
10+
111
import sqlalchemy as sa
212

313
from ._common import RefActions, column_created_datetime, column_modified_datetime

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""Projects networks table
2+
3+
- Represents networks associated with projects.
4+
5+
Migration strategy:
6+
- The primary key is `id`, which is unique and sufficient for migration.
7+
- Ensure foreign key references to `projects` are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
9+
"""
10+
111
import sqlalchemy as sa
212
from sqlalchemy.dialects.postgresql import JSONB
313

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
""" Groups table
1+
"""Projects nodes table
22
3-
- List of groups in the framework
4-
- Groups have a ID, name and a list of users that belong to the group
3+
- Represents nodes within projects.
4+
- List of groups in the framework
5+
- Groups have a ID, name and a list of users that belong to the group
6+
7+
Migration strategy:
8+
- The primary key is `node_id`, which is unique and sufficient for migration.
9+
- Ensure foreign key references to `projects` are valid in the target database.
10+
- No additional changes are required; this table can be migrated as is.
511
"""
612

713
import sqlalchemy as sa

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""Projects tags table
2+
3+
- Links tags to projects.
4+
5+
Migration strategy:
6+
- Composite primary key (`project_id`, `tag_id`) is unique and sufficient for migration.
7+
- Ensure foreign key references to `projects` and `tags` are valid in the target database.
8+
- No additional changes are required; this table can be migrated as is.
9+
"""
10+
111
import sqlalchemy as sa
212

313
from ._common import RefActions

0 commit comments

Comments
 (0)