aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-03 02:59:21 +0200
committertranstrike <transtrike@gmail.com>2021-02-03 02:59:21 +0200
commit81b3fc43a900857443c3c763f52e0a54719c2fae (patch)
tree1f79f61296cc91002233a6de533698172f2e5fd7 /src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs
parentf99d14ff45ec4e03ce261f7f5a8cccf876a94307 (diff)
downloadDevHive-81b3fc43a900857443c3c763f52e0a54719c2fae.tar
DevHive-81b3fc43a900857443c3c763f52e0a54719c2fae.tar.gz
DevHive-81b3fc43a900857443c3c763f52e0a54719c2fae.zip
User-Friends Relation Fixed
Diffstat (limited to 'src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs')
-rw-r--r--src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs b/src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs
new file mode 100644
index 0000000..1388cbc
--- /dev/null
+++ b/src/DevHive.Data/Migrations/20210202234456_Bullshit_Part2.cs
@@ -0,0 +1,61 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace DevHive.Data.Migrations
+{
+ public partial class Bullshit_Part2 : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_UserFriends_AspNetUsers_FriendId",
+ table: "UserFriends");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_UserFriends_AspNetUsers_UserId",
+ table: "UserFriends");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_UserFriends_AspNetUsers_FriendId",
+ table: "UserFriends",
+ column: "FriendId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_UserFriends_AspNetUsers_UserId",
+ table: "UserFriends",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_UserFriends_AspNetUsers_FriendId",
+ table: "UserFriends");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_UserFriends_AspNetUsers_UserId",
+ table: "UserFriends");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_UserFriends_AspNetUsers_FriendId",
+ table: "UserFriends",
+ column: "FriendId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_UserFriends_AspNetUsers_UserId",
+ table: "UserFriends",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ }
+ }
+}