Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete releases attachments if release is deleted #6068

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ var migrations = []Migration{
// v93 -> v94
NewMigration("add email notification enabled preference to user", addEmailNotificationEnabledToUser),
// v94 -> v95
NewMigration("delete orphaned attachments", deleteOrphanedAttachments),
// v95 -> v96
NewMigration("add enable_status_check, status_check_contexts to protected_branch", addStatusCheckColumnsForProtectedBranches),
// v95 -> v96
NewMigration("delete orphaned attachments", deleteOrphanedAttachments),
}

// Migrate database to current version
Expand Down
4 changes: 1 addition & 3 deletions models/migrations/v94.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

package migrations

import (
"github.com/go-xorm/xorm"
)
import "github.com/go-xorm/xorm"

func addStatusCheckColumnsForProtectedBranches(x *xorm.Engine) error {
type ProtectedBranch struct {
Expand Down
4 changes: 4 additions & 0 deletions models/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Use of this source code is governed by a MIT-style
adelowo marked this conversation as resolved.
Show resolved Hide resolved
// license that can be found in the LICENSE file.

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package models

import (
Expand Down