Skip to content

Commit

Permalink
Merge pull request #1405 from nscuro/fix-v440-updater-for-mssql
Browse files Browse the repository at this point in the history
Fix v440Updater for MSSQL
  • Loading branch information
stevespringett authored Feb 18, 2022
2 parents b771a2a + 8bf4664 commit 7daa387
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions docs/_posts/2022-xx-xx-v4.4.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: v4.4.1
type: patch
---

**Features:**

* **Fixes:**
* Resolved defect where the automatic upgrade failed on Microsoft SQL Server databases

**Security:**

**Upgrade Notes:**
* For MSSQL users only: If an upgrade to v4.4.0 was previously attempted and no rollback was performed yet,
the following SQL statement must be executed before launching v4.4.1: `DELETE FROM "PERMISSION" WHERE "NAME" = 'VIEW_VULNERABILITY'`

###### dependency-track-apiserver.war

| Algorithm | Checksum |
| SHA-1 | |
| SHA-256 | |

###### dependency-track-bundled.war

| Algorithm | Checksum |
| SHA-1 | |
| SHA-256 | |

###### Software Bill of Materials (SBOM) ######

[bom.json](https://github.com/DependencyTrack/dependency-track/releases/download/4.4.1/bom.json)
[bom.xml](https://github.com/DependencyTrack/dependency-track/releases/download/4.4.1/bom.xml)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class v440Updater extends AbstractUpgradeItem {

private static final Logger LOGGER = Logger.getLogger(v440Updater.class);
private static final String STMT_1 = "INSERT INTO \"PERMISSION\" (\"NAME\", \"DESCRIPTION\") VALUES (?, ?)";
private static final String STMT_2 = "SELECT \"ID\" FROM \"PERMISSION\" WHERE \"NAME\" = ? LIMIT 1";
private static final String STMT_2 = "SELECT \"ID\" FROM \"PERMISSION\" WHERE \"NAME\" = ?";
private static final String STMT_3 = "SELECT \"u\".\"ID\" FROM \"MANAGEDUSER\" AS \"u\" INNER JOIN \"MANAGEDUSERS_PERMISSIONS\" AS \"up\" ON \"up\".\"MANAGEDUSER_ID\" = \"u\".\"ID\" WHERE \"up\".\"PERMISSION_ID\" = %d";
private static final String STMT_4 = "INSERT INTO \"MANAGEDUSERS_PERMISSIONS\" (\"MANAGEDUSER_ID\", \"PERMISSION_ID\") VALUES (?, ?)";
private static final String STMT_5 = "SELECT \"u\".\"ID\" FROM \"LDAPUSER\" AS \"u\" INNER JOIN \"LDAPUSERS_PERMISSIONS\" AS \"up\" ON \"up\".\"LDAPUSER_ID\" = \"u\".\"ID\" WHERE \"up\".\"PERMISSION_ID\" = %d";
Expand Down

0 comments on commit 7daa387

Please sign in to comment.