Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f41f035
Updated projects to target .NET 4.7.2
pschmidt-previser Nov 20, 2023
6c7130a
Removed artifacts folder.
pschmidt-previser Nov 20, 2023
6e7cc6e
Ignored packages, use Nuget for package managment.
pschmidt-previser Nov 20, 2023
19d6599
Updated projects to .NET 4.7.2
pschmidt-previser Nov 20, 2023
1a9f80c
Added System.Data.SqlServerCe from package manager.
pschmidt-previser Nov 20, 2023
816f708
Updated to Nuget package for: System.Data.SqlServerCe
pschmidt-previser Nov 20, 2023
c163fe7
Created shared assembly file.
pschmidt-previser Nov 20, 2023
d410230
Updated to most recent SMO package and dependencies.
pschmidt-previser Nov 20, 2023
3d74ff2
Updated SMO project dependencies.
pschmidt-previser Nov 20, 2023
0916e91
Cleaned up using statements.
pschmidt-previser Nov 20, 2023
de08203
Added to gitignore
pschmidt-previser Nov 20, 2023
6479839
Added folders to gitignore.
pschmidt-previser Nov 20, 2023
9601f89
Project and solution update.
pschmidt-previser Nov 20, 2023
da74d46
Removed accessor
pschmidt-previser Nov 20, 2023
e8a14db
updated app.config and repositories.config
pschmidt-previser Nov 20, 2023
5ab19a8
Added shared assembly info
pschmidt-previser Nov 20, 2023
b53bb02
Added a default path for notepad.exe to fall back on.
pschmidt-previser Nov 20, 2023
74ddecb
Updated database provider.
pschmidt-previser Nov 20, 2023
38a65c1
Standard grammer update.
pschmidt-previser Nov 20, 2023
3b7220a
Updated Nuget packages.
pschmidt-previser Nov 20, 2023
870e2f1
Added Costura.Fody to compile portable, single executable file.
pschmidt-previser Dec 5, 2023
d52f70b
Added quality of life change when debugging.
pschmidt-previser Dec 5, 2023
be62526
Fixed debug input to allow connections strings to be entered with quo…
pschmidt-previser Dec 5, 2023
e30f094
Simplified sql execution process.
pschmidt-previser Dec 5, 2023
e2e0c10
Added while loop for inner exceptions.
pschmidt-previser Dec 11, 2023
66aef69
Fixed execute SMO to work with updated .dll.
pschmidt-previser Dec 11, 2023
912e69f
Added comments.
pschmidt-previser Dec 11, 2023
6fc505f
case 38185
pschmidt-previser Dec 11, 2023
70154b0
Removed unused references.
pschmidt-previser Dec 11, 2023
3566818
Removed Fody packages to remove non-microsoft components.
pschmidt-previser Dec 19, 2023
5a982b9
Removed lingering Fody files.
pschmidt-previser Jan 2, 2024
61df3db
Merge branch 'dev/update_smo' of https://github.com/pschmidt-previser…
pschmidt-previser Jan 2, 2024
f53e33a
Fixed linked assemblies.
pschmidt-previser Jan 2, 2024
b4e998e
Renamed assembly to hump.
pschmidt-previser Jan 2, 2024
4988bb6
Consolidated package versions, verified that all tests still pass.
pschmidt-previser Jan 2, 2024
a9fc9ce
Updated xunit packages, verified that tests still pass.
pschmidt-previser Jan 2, 2024
e1efe5c
Updated Microsoft packages, verified tests still run.
pschmidt-previser Jan 2, 2024
e9c6339
Added shared shared version info to project.
pschmidt-previser Jan 22, 2024
29efd28
Merge branch 'dev/update_smo' of https://github.com/pschmidt-previser…
pschmidt-previser Jan 22, 2024
19bb2aa
Merge pull request #1 from pschmidt-previser/dev/update_smo
aypreviser Jan 22, 2024
f71c3d8
Updated vulnerable packages.
pschmidt-previser Mar 7, 2024
9868430
case 40325
pschmidt-previser Mar 7, 2024
01b2fb8
Merge pull request #2 from pschmidt-previser/dev/case_40325_ms_vulner…
aypreviser Mar 8, 2024
f39514d
Updated azure configurations.
pschmidt-previser Aug 5, 2024
b7da1b5
updated xunit
pschmidt-previser Aug 5, 2024
06128ce
updated system libraries.
pschmidt-previser Aug 5, 2024
7a5443f
case 41609
pschmidt-previser Aug 5, 2024
8e6013b
Merge pull request #3 from pschmidt-previser/dev/case_40325_ms_vulner…
pschmidt-previser Aug 6, 2024
538ca8e
case 42381
pschmidt-previser Nov 26, 2024
b1e9609
Updated xunit packages.
pschmidt-previser Nov 26, 2024
7593621
Updated System libraries.
pschmidt-previser Nov 26, 2024
7b16b99
Updated Azure
pschmidt-previser Nov 26, 2024
ee6783f
Updated Nuget
pschmidt-previser Nov 26, 2024
8a2d1a5
Removed MSTests.
pschmidt-previser Nov 26, 2024
62fdea8
Merge pull request #4 from PreViser/dev/case_42381
aypreviser Nov 26, 2024
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
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ _ReSharper.*
*.swp
*.resharper.user
*.rptproj.user
*.db
*.db
/.vs
/packages
/Humpback.Tests/.vs
/Humpback.Smo/.vs
/Humpback/.vs
/MigrationBackup
/Humpback.Interfaces/.vs
21 changes: 9 additions & 12 deletions Humpback.Interfaces/Humpback.Interfaces.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B830E3E4-3942-48BB-97A8-3E9BB0E9F1E1}</ProjectGuid>
<ProjectGuid>{15EADEC7-BE27-4334-BA95-0FF3F6BD8A78}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Humpback.Interfaces</RootNamespace>
<AssemblyName>Humpback.Interfaces</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -37,21 +37,18 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedVersionInfo.cs">
<Link>Properties\SharedVersionInfo.cs</Link>
</Compile>
<Compile Include="IDatabaseProvider.cs" />
<Compile Include="IFileWriter.cs" />
<Compile Include="IMigrationProvider.cs" />
<Compile Include="ISqlFormatter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
6 changes: 4 additions & 2 deletions Humpback.Interfaces/IDatabaseProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Humpback.Interfaces {
public interface IDatabaseProvider {
namespace Humpback.Interfaces
{
public interface IDatabaseProvider
{

int GetMigrationVersion();
void UpdateMigrationVersion(int number);
Expand Down
6 changes: 4 additions & 2 deletions Humpback.Interfaces/IFileWriter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Humpback.Interfaces {
public interface IFileWriter {
namespace Humpback.Interfaces
{
public interface IFileWriter
{
void WriteFile(string path, string contents);
bool FileExists(string path);
}
Expand Down
6 changes: 4 additions & 2 deletions Humpback.Interfaces/IMigrationProvider.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Collections.Generic;

namespace Humpback.Interfaces {
public interface IMigrationProvider {
namespace Humpback.Interfaces
{
public interface IMigrationProvider
{
SortedDictionary<int, string> GetMigrations();
SortedDictionary<int, string> GetMigrationsContents();
KeyValuePair<string, string> GetMigrationWithContents(int migration_number);
Expand Down
6 changes: 4 additions & 2 deletions Humpback.Interfaces/ISqlFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Humpback.Interfaces {
public interface ISqlFormatter {
namespace Humpback.Interfaces
{
public interface ISqlFormatter
{
string[] GenerateSQLUp(dynamic operation);
string[] GenerateSQLDown(dynamic operation);
string sql_file_name(string p);
Expand Down
22 changes: 4 additions & 18 deletions Humpback.Interfaces/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Humpback.Interfaces")]
Expand All @@ -14,23 +13,10 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("11266294-df7c-4416-8aae-9f9290fc8382")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: Guid("15eadec7-be27-4334-ba95-0ff3f6bd8a78")]
31 changes: 16 additions & 15 deletions Humpback.Smo/Executor.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;

namespace Humpback.Smo {
public static class Executor {

public static int Execute(string connection_string, string sql) {
using (var conn = new SqlConnection(connection_string)) {
var server = new Server(new ServerConnection(conn));
conn.Open();
return server.ConnectionContext.ExecuteNonQuery(sql);
}
namespace Humpback.Smo
{
public static class Executor
{
/// <summary>
/// Execute TSQL strings using Microsoft.SqlServer.Management.Smo.
/// </summary>
/// <param name="connection_string">Config connection string.</param>
/// <param name="sql">Compiled TSQL script.</param>
/// <returns>number of records affected.</returns>
public static int Execute(string connection_string, string sql)
{
var connection = new Microsoft.Data.SqlClient.SqlConnection(connection_string);
Server server = new Server(new ServerConnection(connection));
return server.ConnectionContext.ExecuteNonQuery(sql);
}
}
}
Loading