Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a828994
update comment
giancarloromeo Dec 20, 2024
abc4ce0
Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
giancarloromeo Dec 20, 2024
7b914eb
Merge branch 'master' into is6963/clean-output-files-removal
giancarloromeo Jan 6, 2025
abe60b8
Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
giancarloromeo Jan 6, 2025
37acb71
Merge branch 'is6963/clean-output-files-removal' of github.com:gianca…
giancarloromeo Jan 6, 2025
639a561
add ref_count column
giancarloromeo Jan 6, 2025
84782af
add ref_count field
giancarloromeo Jan 6, 2025
55d17a8
Merge branch 'master' into is6963/clean-output-files-removal
giancarloromeo Jan 21, 2025
08f436c
Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
giancarloromeo Jan 22, 2025
34d38c8
Merge branch 'master' into is6963/clean-output-files-removal
giancarloromeo Jan 22, 2025
42e1d33
Merge branch 'is6963/clean-output-files-removal' of github.com:gianca…
giancarloromeo Jan 22, 2025
d206013
upgrade script
giancarloromeo Jan 22, 2025
ee0f739
Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
giancarloromeo Jan 22, 2025
efb57ab
add rabbitmq client setup
giancarloromeo Jan 22, 2025
2bf9eb6
add event when deleting file
giancarloromeo Jan 24, 2025
a229d0a
Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
giancarloromeo Jan 27, 2025
31e1327
remove ref_count
giancarloromeo Jan 28, 2025
1356f11
remove ref_count
giancarloromeo Jan 28, 2025
ec4379a
rename
giancarloromeo Jan 28, 2025
04ceb61
add nodes outputs update
giancarloromeo Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Add file ref_count

Revision ID: a80132007436
Revises: 1e3c9c804fec
Create Date: 2025-01-06 12:17:49.935022+00:00

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "a80132007436"
down_revision = "1e3c9c804fec"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"file_meta_data",
sa.Column(
"ref_count", sa.Integer(), server_default=sa.text("0"), nullable=False
),
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("file_meta_data", "ref_count")
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@
doc="SHA256 checksum of the file content",
index=True,
),
sa.Column(
"ref_count",
sa.Integer(),
nullable=False,
server_default=sa.text("0"),
doc="Number of references to the file",
),
)
1 change: 1 addition & 0 deletions services/storage/src/simcore_service_storage/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class FileMetaDataAtDB(BaseModel):
upload_expires_at: datetime.datetime | None = None
is_directory: bool
sha256_checksum: SHA256Str | None = None
ref_count: int = 0

model_config = ConfigDict(from_attributes=True, extra="forbid")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# NOTE: MD: I intentionally didn't include the workbench. There is a special interface
# for the workbench, and at some point, this column should be removed from the table.
# The same holds true for access_rights/ui/classifiers/quality, but we have decided to proceed step by step.
# The same holds true for ui/classifiers/quality, but we have decided to proceed step by step.
_SELECTION_PROJECT_DB_ARGS = [ # noqa: RUF012
projects.c.id,
projects.c.type,
Expand Down
Loading