-
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.
Merge pull request #69 from galliumplus/feature/db-migrations
Migrations de BDD
- Loading branch information
Showing
42 changed files
with
609 additions
and
231 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
.idea/.idea.Gallium+ API/.idea/codeStyles/codeStyleConfig.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeNamespaceBody/@EntryIndexedValue">WARNING</s:String> | ||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/NAMESPACE_BODY/@EntryValue">FileScoped</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=galliumplus/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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
5 changes: 2 additions & 3 deletions
5
MariaDb/SessionDao.cs → MariaDb/Implementations/SessionDao.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
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
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_BotClient_extends_Client.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_016)] | ||
public class CreateForeignKey_BotClient_extends_Client : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_BotClient_extends_Client") | ||
.FromTable("BotClient").ForeignColumn("id").ToTable("Client").PrimaryColumn("id") | ||
.OnUpdate(Rule.Cascade) .OnDelete(Rule.Cascade); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("BotClient_extends_Client"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_HistoryAction_HistoryUser_actor.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_019)] | ||
public class CreateForeignKey_HistoryAction_HistoryUser_actor : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_HistoryAction_HistoryUser_actor") | ||
.FromTable("HistoryAction").ForeignColumn("actor").ToTable("HistoryUser").PrimaryColumn("id") | ||
.OnUpdate(Rule.None).OnDelete(Rule.None); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("HistoryAction_HistoryUser_actor"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_HistoryAction_HistoryUser_target.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_020)] | ||
public class CreateForeignKey_HistoryAction_HistoryUser_target : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_HistoryAction_HistoryUser_target") | ||
.FromTable("HistoryAction").ForeignColumn("target").ToTable("HistoryUser").PrimaryColumn("id") | ||
.OnUpdate(Rule.None).OnDelete(Rule.None); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("HistoryAction_HistoryUser_target"); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
MariaDb/Migrations/v1_00_00/CreateForeignKey_PasswordResetToken_User_userId.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,23 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_013)] | ||
public class CreateForeignKey_PasswordResetToken_User_userId : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_PasswordResetToken_User_userId") | ||
.FromTable("PasswordResetToken").ForeignColumn("userId").ToTable("User").PrimaryColumn("userId") | ||
.OnUpdate(Rule.Cascade).OnDelete(Rule.Cascade); | ||
|
||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("FK_PasswordResetToken_User_userId"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_Product_Category_category.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_018)] | ||
public class CreateForeignKey_Product_Category_category : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_Product_Category_category") | ||
.FromTable("Product").ForeignColumn("category").ToTable("Category").PrimaryColumn("id") | ||
.OnUpdate(Rule.Cascade) .OnDelete(Rule.None); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("Product_Category_category"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_Session_Client_client.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_015)] | ||
public class CreateForeignKey_Session_Client_client : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_Session_Client_client") | ||
.FromTable("Session").ForeignColumn("client").ToTable("Client").PrimaryColumn("id") | ||
.OnUpdate(Rule.Cascade) .OnDelete(Rule.Cascade); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("Session_Client_client"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_Session_User_user.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_014)] | ||
public class CreateForeignKey_Session_User_user : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_Session_User_user") | ||
.FromTable("Session").ForeignColumn("user").ToTable("User").PrimaryColumn("id") | ||
.OnUpdate(Rule.Cascade) .OnDelete(Rule.Cascade); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("Session_User_user"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
MariaDb/Migrations/v1_00_00/CreateForeignKey_SsoClient_extends_Client.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,22 @@ | ||
using System.Data; | ||
using FluentMigrator; | ||
|
||
namespace GalliumPlus.WebApi.Data.MariaDb.Migrations.v1_00_00; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedType.Global | ||
[Migration(2024_07_03_017)] | ||
public class CreateForeignKey_SsoClient_extends_Client : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.Create.ForeignKey("FK_SsoClient_extends_Client") | ||
.FromTable("SsoClient").ForeignColumn("id").ToTable("Client").PrimaryColumn("id") | ||
.OnUpdate(Rule.Cascade) .OnDelete(Rule.Cascade); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
this.Delete.ForeignKey("SsoClient_extends_Client"); | ||
} | ||
} |
Oops, something went wrong.