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

Release/12.1.2.0 #3662

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void CopyDBAcrossServersTest()
{
string clientCode = "DHS";
string appCode = "CSET";
DbManager manager = new DbManager(new Version("12.1.1.0"),clientCode, appCode);
DbManager manager = new DbManager(new Version("12.1.2.0"),clientCode, appCode);
//TODO finish this.
//manager.CopyDBAcrossServers();
}
Expand All @@ -42,7 +42,7 @@ public void CopyDBFromInstallationSource()
//setup a destination file
string clientCode = "DHS";
string appCode = "CSET";
DbManager manager = new DbManager(new Version("12.1.1.0"), clientCode, appCode);
DbManager manager = new DbManager(new Version("12.1.2.0"), clientCode, appCode);
//run the same test twice and make sure that the number increment works
string mdf = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\\CSETWebTest.mdf";
string ldf = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\\CSETWebTest_log.ldf";
Expand All @@ -68,7 +68,7 @@ public void TestUpgrade()
//setup a destination file
string clientCode = "Test";
string appCode = "Test";
DbManager manager = new DbManager(new Version("12.1.1.0"), clientCode, appCode);
DbManager manager = new DbManager(new Version("12.1.2.0"), clientCode, appCode);

//manager.ForceCloseAndDetach(DbManager.localdb2019_ConnectionString, "TestWeb");
//manager.AttachTest("TestWeb", testdb, testlog);
Expand All @@ -81,7 +81,7 @@ public void TestUpgrade()

manager.SetupDb();

upgrader.UpgradeOnly(new Version("12.1.1.0"), "data source=(localdb)\\inllocaldb2022;initial catalog=TestWeb;persist security info=True;Integrated Security=SSPI;MultipleActiveResultSets=True");
upgrader.UpgradeOnly(new Version("12.1.2.0"), "data source=(localdb)\\inllocaldb2022;initial catalog=TestWeb;persist security info=True;Integrated Security=SSPI;MultipleActiveResultSets=True");


}
Expand All @@ -94,7 +94,7 @@ public void TestSetup()
//setup a destination file
string clientCode = "DHS";
string appCode = "CSET";
DbManager manager = new DbManager(new Version("12.1.1.0"), clientCode, appCode);
DbManager manager = new DbManager(new Version("12.1.2.0"), clientCode, appCode);
manager.SetupDb();
}

Expand All @@ -106,7 +106,7 @@ public void CopyDBFromInstallationSourceTest2()
string mdf = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\\CSETWebTest.mdf";
string ldf = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\\CSETWebTest_log.ldf";

DbManager manager = new DbManager(new Version("12.1.1.0"), clientCode, appCode);
DbManager manager = new DbManager(new Version("12.1.2.0"), clientCode, appCode);
//run the same test twice and make sure that the number increment works
string conString = "Server=(localdb)\\inllocaldb2022;Integrated Security=true;AttachDbFileName=" + mdf;
using (SqlConnection conn = new SqlConnection(conString))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion>12.1.1.0</AssemblyVersion>
<AssemblyVersion>12.1.2.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ο»Ώ////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
using System;
using Microsoft.Data.SqlClient;
using System.IO;
namespace UpgradeLibrary.Upgrade
{
internal class ConvertDatabase12120 : ConvertSqlDatabase
{
public ConvertDatabase12120(string path) : base(path)
{
myVersion = new Version("12.1.2.0");
}

/// <summary>
/// Runs the database update script
/// </summary>
/// <param name="conn"></param>
public override void Execute(SqlConnection conn)
{
try
{
this.UpgradeToVersionLocalDB(conn, myVersion);
}
catch (Exception e)
{
throw new DatabaseUpgradeException("Error in upgrading database version 12.1.1.0 to 12.1.2.0: " + e.Message);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public VersionUpgrader(string path)
converters.Add("12.0.3.1", new ConvertDatabase12032(path));
converters.Add("12.0.3.2", new ConvertDatabase12100(path));
converters.Add("12.1.0.0", new ConvertDatabase12110(path));
converters.Add("12.1.1.0", new ConvertDatabase12120(path));
}

public void UpgradeOnly(Version currentVersion, string tempConnect)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion>12.1.1.0</AssemblyVersion>
<AssemblyVersion>12.1.2.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'CSETWeb_ApiCore' " />
Expand Down
32 changes: 3 additions & 29 deletions CSETWebNg/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions CSETWebNg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csetweb-ng",
"version": "12.1.1",
"version": "12.1.2",
"license": "MIT",
"main": "main-electron.js",
"private": true,
Expand Down Expand Up @@ -142,4 +142,4 @@
"minimatch": "3.0.8",
"xml2js": "0.5.0"
}
}
}
4 changes: 2 additions & 2 deletions CSETWebNg/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const environment = {
apiUrl: '',
docUrl: '',
appCode: 'CSET',
visibleVersion: '12.1.1.0',
version: '12.1.1.0',
visibleVersion: '12.1.2.0',
version: '12.1.2.0',
helpContactEmail: '',
helpContactPhone: ''
};
4 changes: 2 additions & 2 deletions CSETWebNg/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const environment = {
apiUrl: 'https://localhost:5001/api/',
docUrl: 'https://localhost:5001/Documents/',
appCode: 'CSET',
visibleVersion: '12.1.1.0',
version: '12.1.1.0',
visibleVersion: '12.1.2.0',
version: '12.1.2.0',
helpContactEmail: 'cset@cisa.dhs.gov',
helpContactPhone: ''
};
Loading