extensions-website/files/migrations
Anna Sirota b0bb4905b2 Reuse files as previews, icons or featured images (#161)
Now it should be be possible to:

* upload the same image as a preview or featured image on different extensions;
* upload the same image as an icon on different extensions;
* select the same video/image multiple times while adding previews on Draft or Edit page: first one will be saved, the rest of the duplicates will be ignored.

If all extensions referencing the file in any way are deleted, the file remains in the database: no thumbnail generating or scanning will happen if/when the file gets re-uploaded as a preview or featured image.

In all cases of re-upload `File.user` will not change: this shouldn't be a problem because currently there's no code relying on image ownership.

Version files will remain the only exception from this changed behaviour: it will only be possible to re-upload a version file once the version itself is deleted (which also deletes its file).

As a consequence of this change `File.extension_id` is dropped, because it is no longer possible to choose which extension should be saved there.

Should take care of #157

Reviewed-on: #161
Reviewed-by: Oleg-Komarov <oleg-komarov@noreply.localhost>
2024-06-04 12:23:25 +02:00
..
__init__.py Initial models, tests and other boilerplate 2022-08-25 17:37:48 +02:00
0001_initial.py Flattening out django migrations 2024-01-29 16:41:08 +01:00
0002_initial.py Flattening out django migrations 2024-01-29 16:41:08 +01:00
0003_alter_file_type.py Make migrations 2024-02-22 21:25:15 +01:00
0004_alter_file_status.py Make all files approved by default 2024-02-26 15:52:38 +01:00
0005_rename_validation_filevalidation_results_and_more.py Scan files with clamdscan (#77) 2024-04-12 19:11:28 +02:00
0006_remove_file_date_deleted.py Make it possible to fully delete unlisted/unrated extensions and versions (#81) 2024-04-19 11:00:13 +02:00
0007_alter_file_status.py Fix a failing migration 2024-04-19 11:11:45 +02:00
0008_alter_file_thumbnail.py Thumbnails for images and videos (#87) 2024-04-25 17:50:56 +02:00
0009_file_extension.py Files: add extension field to the model 2024-05-09 17:55:46 +02:00
0010_remove_file_extension_alter_file_hash_and_more.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00