From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- server/src/Migrations/20220319203018_UserBase.cs | 140 ----------------------- 1 file changed, 140 deletions(-) delete mode 100644 server/src/Migrations/20220319203018_UserBase.cs (limited to 'server/src/Migrations/20220319203018_UserBase.cs') diff --git a/server/src/Migrations/20220319203018_UserBase.cs b/server/src/Migrations/20220319203018_UserBase.cs deleted file mode 100644 index 14d3f4b..0000000 --- a/server/src/Migrations/20220319203018_UserBase.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace IOL.GreatOffice.Api.Migrations -{ - public partial class UserBase : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "modified_at", - table: "forgot_password_requests"); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_labels", - type: "uuid", - nullable: true, - oldClrType: typeof(Guid), - oldType: "uuid"); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_entries", - type: "uuid", - nullable: true, - oldClrType: typeof(Guid), - oldType: "uuid"); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_categories", - type: "uuid", - nullable: true, - oldClrType: typeof(Guid), - oldType: "uuid"); - - migrationBuilder.CreateIndex( - name: "ix_time_labels_user_id", - table: "time_labels", - column: "user_id"); - - migrationBuilder.CreateIndex( - name: "ix_time_entries_user_id", - table: "time_entries", - column: "user_id"); - - migrationBuilder.CreateIndex( - name: "ix_time_categories_user_id", - table: "time_categories", - column: "user_id"); - - migrationBuilder.AddForeignKey( - name: "fk_time_categories_users_user_id", - table: "time_categories", - column: "user_id", - principalTable: "users", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_time_entries_users_user_id", - table: "time_entries", - column: "user_id", - principalTable: "users", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_time_labels_users_user_id", - table: "time_labels", - column: "user_id", - principalTable: "users", - principalColumn: "id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_time_categories_users_user_id", - table: "time_categories"); - - migrationBuilder.DropForeignKey( - name: "fk_time_entries_users_user_id", - table: "time_entries"); - - migrationBuilder.DropForeignKey( - name: "fk_time_labels_users_user_id", - table: "time_labels"); - - migrationBuilder.DropIndex( - name: "ix_time_labels_user_id", - table: "time_labels"); - - migrationBuilder.DropIndex( - name: "ix_time_entries_user_id", - table: "time_entries"); - - migrationBuilder.DropIndex( - name: "ix_time_categories_user_id", - table: "time_categories"); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_labels", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - oldClrType: typeof(Guid), - oldType: "uuid", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_entries", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - oldClrType: typeof(Guid), - oldType: "uuid", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "user_id", - table: "time_categories", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - oldClrType: typeof(Guid), - oldType: "uuid", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "modified_at", - table: "forgot_password_requests", - type: "timestamp with time zone", - nullable: true); - } - } -} -- cgit v1.3