aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs')
-rw-r--r--src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs134
1 files changed, 0 insertions, 134 deletions
diff --git a/src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs b/src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs
deleted file mode 100644
index 7c8e77a..0000000
--- a/src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace DevHive.Web.Migrations
-{
- public partial class UserRoleTest : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "Role",
- table: "AspNetUsers");
-
- migrationBuilder.AddColumn<string>(
- name: "Name",
- table: "Technologies",
- type: "text",
- nullable: true);
-
- migrationBuilder.AlterColumn<string>(
- name: "UserName",
- table: "AspNetUsers",
- type: "character varying(256)",
- maxLength: 256,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(256)",
- oldMaxLength: 256);
-
- migrationBuilder.AlterColumn<string>(
- name: "LastName",
- table: "AspNetUsers",
- type: "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn<string>(
- name: "FirstName",
- table: "AspNetUsers",
- type: "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.CreateTable(
- name: "RoleUser",
- columns: table => new
- {
- RolesId = table.Column<Guid>(type: "uuid", nullable: false),
- UsersId = table.Column<Guid>(type: "uuid", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_RoleUser", x => new { x.RolesId, x.UsersId });
- table.ForeignKey(
- name: "FK_RoleUser_AspNetRoles_RolesId",
- column: x => x.RolesId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_RoleUser_AspNetUsers_UsersId",
- column: x => x.UsersId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetRoles_Id",
- table: "AspNetRoles",
- column: "Id",
- unique: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_RoleUser_UsersId",
- table: "RoleUser",
- column: "UsersId");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "RoleUser");
-
- migrationBuilder.DropIndex(
- name: "IX_AspNetRoles_Id",
- table: "AspNetRoles");
-
- migrationBuilder.DropColumn(
- name: "Name",
- table: "Technologies");
-
- migrationBuilder.AlterColumn<string>(
- name: "UserName",
- table: "AspNetUsers",
- type: "character varying(256)",
- maxLength: 256,
- nullable: false,
- defaultValue: "",
- oldClrType: typeof(string),
- oldType: "character varying(256)",
- oldMaxLength: 256,
- oldNullable: true);
-
- migrationBuilder.AlterColumn<string>(
- name: "LastName",
- table: "AspNetUsers",
- type: "text",
- nullable: false,
- defaultValue: "",
- oldClrType: typeof(string),
- oldType: "text",
- oldNullable: true);
-
- migrationBuilder.AlterColumn<string>(
- name: "FirstName",
- table: "AspNetUsers",
- type: "text",
- nullable: false,
- defaultValue: "",
- oldClrType: typeof(string),
- oldType: "text",
- oldNullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "Role",
- table: "AspNetUsers",
- type: "text",
- nullable: true);
- }
- }
-}