aboutsummaryrefslogtreecommitdiff
path: root/models/project/project.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/project/project.go')
-rw-r--r--models/project/project.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/project/project.go b/models/project/project.go
index 46b5c07c4..f3ed72303 100644
--- a/models/project/project.go
+++ b/models/project/project.go
@@ -409,7 +409,7 @@ func DeleteProjectByID(ctx context.Context, id int64) error {
func DeleteProjectByRepoID(ctx context.Context, repoID int64) error {
switch {
- case setting.Database.UseSQLite3:
+ case setting.Database.Type.IsSQLite3():
if _, err := db.GetEngine(ctx).Exec("DELETE FROM project_issue WHERE project_issue.id IN (SELECT project_issue.id FROM project_issue INNER JOIN project WHERE project.id = project_issue.project_id AND project.repo_id = ?)", repoID); err != nil {
return err
}
@@ -419,7 +419,7 @@ func DeleteProjectByRepoID(ctx context.Context, repoID int64) error {
if _, err := db.GetEngine(ctx).Table("project").Where("repo_id = ? ", repoID).Delete(&Project{}); err != nil {
return err
}
- case setting.Database.UsePostgreSQL:
+ case setting.Database.Type.IsPostgreSQL():
if _, err := db.GetEngine(ctx).Exec("DELETE FROM project_issue USING project WHERE project.id = project_issue.project_id AND project.repo_id = ? ", repoID); err != nil {
return err
}