diff options
author | Lanre Adelowo <yo@lanre.wtf> | 2019-09-22 10:05:48 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-09-22 12:05:48 +0300 |
commit | 63ff61615ec6aaa25887f8ce605c9082c106a34b (patch) | |
tree | c00595b76b52a8a694f93f56fab265bcab5d24a6 /models/migrations/migrations.go | |
parent | 6322d254e72c7c794f9d2e2325972249f187eae1 (diff) | |
download | gitea-63ff61615ec6aaa25887f8ce605c9082c106a34b.tar.gz gitea-63ff61615ec6aaa25887f8ce605c9082c106a34b.zip |
Delete releases attachments if release is deleted (#6068)
* delete attachments from the database and file system
* add migration
* fix import statements
* fix package name
* remove conditional should in case the confi has been changed and the server restarted
* simplify deletion of attachments in DB
* fix CI build
* fix review
* add copyright in the proper place
* fix review
Diffstat (limited to 'models/migrations/migrations.go')
-rw-r--r-- | models/migrations/migrations.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 7c5277fbbd..8717da789e 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -246,6 +246,8 @@ var migrations = []Migration{ NewMigration("add enable_status_check, status_check_contexts to protected_branch", addStatusCheckColumnsForProtectedBranches), // v95 -> v96 NewMigration("add table columns for cross referencing issues", addCrossReferenceColumns), + // v96 -> v97 + NewMigration("delete orphaned attachments", deleteOrphanedAttachments), } // Migrate database to current version |