extensions-website/extensions/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 Mass rename INCOMPLETE -> DRAFT 2024-05-23 18:26:20 +02:00
0002_initial.py Flattening out django migrations 2024-01-29 16:41:08 +01:00
0003_initial.py Flattening out django migrations 2024-01-29 16:41:08 +01:00
0004_version_schema_version.py Get schema_version from file 2024-02-02 11:10:45 +01:00
0005_rename_and_update_extension_homepage_url_website.py Rename homepage_url -> website and update description 2024-02-02 16:23:32 +01:00
0006_remove_extension_doc_url.py Remove documentation_url 2024-02-02 16:27:28 +01:00
0007_remove_extension_support.py Remove SUPPORT level for add-ons 2024-02-02 16:30:53 +01:00
0008_rename_extension_tracker_url_extension_support_and_alter.py Rename Tracker URL -> Support and update its decription 2024-02-02 16:34:43 +01:00
0009_alter_extension_tagline.py Add missing . for the tagline field description 2024-02-02 16:35:34 +01:00
0010_extension_is_listed.py Fix listing of extensions with only invalid versions 2024-02-10 19:37:48 +01:00
0011_versionpermission_version_permissions.py Manifest: New field "permission" 2024-02-18 15:04:23 +01:00
0012_alter_version_permissions.py Initial review process 2024-02-18 19:05:12 +01:00
0013_extension_sponsor.py Sponsor: New URL option for a project to get supported by the community 2024-02-20 14:06:26 +01:00
0014_alter_extension_tagline.py Make tagline shorter: 64 2024-02-20 20:10:17 +01:00
0015_alter_version_blender_version_max_and_more.py Simplify submission form 2024-02-20 20:28:28 +01:00
0016_remove_extension_tagline_version_tagline.py Move Tagline from Extension to Version model 2024-02-21 19:25:12 +01:00
0017_remove_version_license_version_licenses.py Make licenses to support multiple licenses 2024-02-21 21:17:45 +01:00
0018_remove_extension_tags_version_tags.py Bring tags from Extension to Version 2024-02-22 00:12:33 +01:00
0019_remove_extension_sponsor.py Remove sponsor from the model 2024-02-22 14:34:26 +01:00
0020_apply_about_page_and_permissions_fixtures.py Fix migrations 2024-02-22 21:19:38 +01:00
0021_apply_fixtures_fix.py Fixup for version permission fixtures 2024-02-22 20:24:50 +01:00
0022_alter_extension_type.py Make migrations 2024-02-22 21:25:15 +01:00
0023_apply_new_licenses.py Add new compatible licenses 2024-02-26 18:03:31 +01:00
0024_tagsaddons_tagsthemes_remove_version_tags_and_more.py Add tag values in the historical migration #123 2024-05-13 15:25:39 +02:00
0025_alter_tag_type.py Show tags in the admin interface 2024-02-29 18:02:02 +01:00
0026_remove_extension_date_deleted_and_more.py Make it possible to fully delete unlisted/unrated extensions and versions (#81) 2024-04-19 11:00:13 +02:00
0027_unique_preview_files.py Previews: only unique files can be used 2024-04-23 14:29:23 +02:00
0028_alter_license_slug_alter_versionpermission_slug.py Don't treat permission name as a machine readable field, use slug instead (#115) 2024-05-06 17:40:06 +02:00
0028_terms_flatpages_rename.py Merge 'policies' and 'conditions of use' pages (#117) 2024-05-07 19:20:15 +02:00
0029_extension_featured_image_extension_icon.py Icon: mention PNG in the help text 2024-05-17 16:23:36 +02:00
0029_remove_extensionreviewerflags_extension_and_more.py Dead code removed 2024-05-14 09:08:30 +02:00
0030_platform_version_platforms.py Support for platforms and wheels (#131) 2024-05-16 18:20:41 +02:00
0031_extension_latest_version.py Use a materialized Extension.latest_version field instead of a dynamic property (#152) 2024-05-27 17:58:54 +02:00
0032_extension_extensions__is_list_765936_idx_and_more.py Extensions list: Add sort by options and filter improvements 2024-06-03 12:57:44 +02:00
0033_extensions_fts_20240603_1918.py Full-text search using postgresql (#162) 2024-06-03 20:07:21 +02:00
0034_alter_extension_featured_image_alter_extension_icon_and_more.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00