Version: drop file field, use files instead #193

Merged
Oleg-Komarov merged 6 commits from version-drop-file into main 2024-06-21 11:29:22 +02:00
Owner

Part of #74.

This PR drops Extension.file field, and introduces a cached_property Extension.file
as a temporary replacement for existing code references to the dropped field.

VersionFiles is renamed to VersionFile to match naming conventions.
All reads and writes go only via VersionFile cross-table, still assuming a single File
record per Version.

No functional changes are expected, except for one unfortunate side-effect in
recording object deletion via LogEntry: Version deletion is recorded twice:

  1. during Extension deleting its Version objects via CASCADE
  2. during post_delete for VersionFile when the check for the last file is done

After this change is deployed, we can start implementing multiple file uploads per
Version to support multi-platform builds (generated with --split-platforms option).

Part of #74. This PR drops Extension.file field, and introduces a cached_property Extension.file as a temporary replacement for existing code references to the dropped field. VersionFiles is renamed to VersionFile to match naming conventions. All reads and writes go only via VersionFile cross-table, still assuming a single File record per Version. No functional changes are expected, except for one unfortunate side-effect in recording object deletion via LogEntry: Version deletion is recorded twice: 1. during Extension deleting its Version objects via CASCADE 2. during post_delete for VersionFile when the check for the last file is done After this change is deployed, we can start implementing multiple file uploads per Version to support multi-platform builds (generated with `--split-platforms` option).
Oleg-Komarov added 3 commits 2024-06-20 20:46:21 +02:00
Oleg-Komarov added 1 commit 2024-06-21 10:44:58 +02:00
Oleg-Komarov added 2 commits 2024-06-21 10:58:45 +02:00
Anna Sirota approved these changes 2024-06-21 11:11:44 +02:00
Anna Sirota left a comment
Owner

LGTM

LGTM
Oleg-Komarov merged commit 3922f5d868 into main 2024-06-21 11:29:22 +02:00
Oleg-Komarov deleted branch version-drop-file 2024-06-21 11:29:23 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#193
No description provided.