-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* d * sqlite * f * f * f * w * d * a * todo * d * fix runnings format * e * h * update nugets --------- Co-authored-by: jer\tsahi_a <tsahi_a@malam.com>
- Loading branch information
1 parent
faab25e
commit fe53c92
Showing
123 changed files
with
3,238 additions
and
1,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3.4' | ||
|
||
services: | ||
planar: | ||
image: atias007/planar:latest | ||
container_name: planar-service | ||
ports: | ||
- '2306:2306' | ||
environment: | ||
- TZ=Israel | ||
- PLANAR_DB_PROVIDER=Sqlite | ||
volumes: | ||
- ./Planar/Data:/app/Data | ||
depends_on: | ||
- db | ||
|
||
# docker-compose -f docker-compose-sqlite up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker-compose -p planar up -d | ||
docker-compose -f docker-compose-sqlite.yml -p planar up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using DbUp; | ||
using DbUp.Engine; | ||
using System.Data; | ||
using System.Reflection; | ||
|
||
namespace DatabaseMigrations.SqlServer; | ||
|
||
public class Executer : IExecuter | ||
{ | ||
public static Assembly ScriptAssembly => typeof(Executer).Assembly; | ||
|
||
public void EnsureDatabaseExists(string connectionString) | ||
{ | ||
EnsureDatabase.For.SqlDatabase(connectionString); | ||
} | ||
|
||
public DatabaseUpgradeResult DemoExecute(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SqlDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput() | ||
.WithTransactionAlwaysRollback(); | ||
|
||
var upgrader = builder.Build(); | ||
var result = upgrader.PerformUpgrade(); | ||
return result; | ||
} | ||
|
||
public DatabaseUpgradeResult Execute(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SqlDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput() | ||
.WithTransaction(); | ||
|
||
var upgrader = builder.Build(); | ||
var result = upgrader.PerformUpgrade(); | ||
return result; | ||
} | ||
|
||
public IEnumerable<string> GetScripts(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SqlDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput(); | ||
|
||
var result = builder.Build().GetScriptsToExecute().Select(s => s.Name); | ||
return result; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/DatabaseMigrations.Factory/Scripts/Planar_0064 - drop_proc.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
DROP PROCEDURE dbo.PersistJobInstanceLog | ||
DROP PROCEDURE dbo.UpdateJobInstanceLogAnomaly | ||
DROP PROCEDURE dbo.SetJobInstanceLogStatus | ||
DROP PROCEDURE dbo.DeleteUser | ||
DROP PROCEDURE dbo.CountFailsInHourForJob | ||
DROP PROCEDURE dbo.CountFailsInRowForJob | ||
DROP PROCEDURE dbo.IncreaseMonitorCounter | ||
DROP PROCEDURE dbo.ResetMonitorCounter | ||
DROP PROCEDURE [Statistics].[StatusCounter] | ||
DROP PROCEDURE [Statistics].[TraceCounter] |
21 changes: 21 additions & 0 deletions
21
src/DatabaseMigrations.Scripts/DatabaseMigrations.Sqlite/DatabaseMigrations.Sqlite.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="Scripts\Planar_0001 - startup.sql" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="Scripts\Planar_0001 - startup.sql" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\DbUp\dbup-sqlite\dbup-sqlite.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
59 changes: 59 additions & 0 deletions
59
src/DatabaseMigrations.Scripts/DatabaseMigrations.Sqlite/Executer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using DbUp; | ||
using DbUp.Engine; | ||
using System.Data; | ||
using System.Reflection; | ||
|
||
namespace DatabaseMigrations.Sqlite; | ||
|
||
public class Executer : IExecuter | ||
{ | ||
public static Assembly ScriptAssembly => typeof(Executer).Assembly; | ||
|
||
public void EnsureDatabaseExists(string connectionString) | ||
{ | ||
// *** DO NOTHING *** | ||
} | ||
|
||
public DatabaseUpgradeResult DemoExecute(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SQLiteDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput() | ||
.WithTransactionAlwaysRollback(); | ||
|
||
var upgrader = builder.Build(); | ||
var result = upgrader.PerformUpgrade(); | ||
return result; | ||
} | ||
|
||
public DatabaseUpgradeResult Execute(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SQLiteDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput() | ||
.WithTransaction(); | ||
|
||
var upgrader = builder.Build(); | ||
var result = upgrader.PerformUpgrade(); | ||
return result; | ||
} | ||
|
||
public IEnumerable<string> GetScripts(string connectionString) | ||
{ | ||
var builder = | ||
DeployChanges.To | ||
.SQLiteDatabase(connectionString) | ||
.WithScriptsEmbeddedInAssembly(ScriptAssembly) | ||
.LogToConsole() | ||
.LogScriptOutput(); | ||
|
||
var result = builder.Build().GetScriptsToExecute().Select(s => s.Name); | ||
return result; | ||
} | ||
} |
Oops, something went wrong.