Skip to content

Conversation

@glpatcern
Copy link
Member

@glpatcern glpatcern commented Nov 13, 2025

With this PR we introduce new constraints and rename some fields for better consistency:

  • Types used by OCM structures only are prefixed with
    Ocm, and AccessMethod and Protocol were
    consolidated into OcmProtocol
  • ItemType is used in OCM shares as well
  • The (FileIdPrefix, ItemSource) tuple is now
    (Instance, Inode) in OcmShare, and it was
    removed from OcmReceivedShare as unused
  • Unique index constraints have been created for regular Shares
    and for OcmShares on (instance, inode, shareWith, deletedAt)
  • The unique indexes have been renamed with a u_
    prefix for consistency: this affected u_shareid_user,
    u_link_token. The i_share_with was dropped
    as redundant.
  • Alias and Hidden were added in OcmReceivedShare

@update-docs
Copy link

update-docs bot commented Nov 13, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@glpatcern glpatcern force-pushed the ocm-model-refactor branch 6 times, most recently from 3755df9 to 6f31fd6 Compare November 14, 2025 16:54
@glpatcern glpatcern changed the title Some refactoring of the GORM model for OCM Some refactoring of the GORM model for shares Nov 15, 2025
@glpatcern glpatcern changed the title Some refactoring of the GORM model for shares Refactoring of the GORM model for shares Nov 15, 2025
@glpatcern glpatcern force-pushed the ocm-model-refactor branch 2 times, most recently from 23b583c to 1afe2c4 Compare November 15, 2025 12:29
@glpatcern glpatcern marked this pull request as draft November 17, 2025 07:53
@rawe0
Copy link
Member

rawe0 commented Nov 17, 2025

I've tested this version and it doesn't seem to break anything in the normal shares/public links - the DB is fine without migration, however the OCM tables need to be recreated because of the rename from access methods -> protocols and the fileidprefix rename.

@glpatcern
Copy link
Member Author

As we've seen with Rasmus, everything works but the indexes are not created the way we want, so this requires a bit more work before going ahead.

@glpatcern glpatcern force-pushed the ocm-model-refactor branch 5 times, most recently from 8c75e7b to ef5e3cd Compare November 18, 2025 10:48
@glpatcern glpatcern marked this pull request as ready for review November 18, 2025 13:47
@glpatcern
Copy link
Member Author

Now tested in full on a dev node - I created all types of shares and everything worked.

@glpatcern glpatcern marked this pull request as draft November 24, 2025 16:15
@glpatcern glpatcern marked this pull request as ready for review November 25, 2025 14:44
@glpatcern glpatcern requested a review from diocas November 26, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants