diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-19 14:35:08 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-19 14:35:08 +0200 |
| commit | 3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920 (patch) | |
| tree | d9aa0f986732933d0d5efea630fec9ca26affc8a /src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs | |
| parent | c8ce9f236f69cd0be2fb156171b53efa62930122 (diff) | |
| download | DevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.tar DevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.tar.gz DevHive-3fc676497f4a4b1671e31cc3b8cd3e4c6ac96920.zip | |
ALmost solved DP
Diffstat (limited to 'src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs')
| -rw-r--r-- | src/DevHive.Web/Migrations/20201217083429_UserRoleTest.cs | 134 |
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); - } - } -} |
