using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Brizco.Repository.Migrations { /// public partial class EditShiftPlanAddSuperVisior : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskShifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskShifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskShifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Tasks", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Tasks", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Tasks", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskPositions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskPositions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskPositions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Shifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Shifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Shifts", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AddColumn( name: "SupervisorId", schema: "public", table: "ShiftPlans", type: "uuid", nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftDays", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Sections", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Sections", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Sections", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Routines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Routines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Routines", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Positions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Positions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Positions", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Complexes", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Complexes", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Complexes", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.CreateIndex( name: "IX_ShiftPlans_SupervisorId", schema: "public", table: "ShiftPlans", column: "SupervisorId"); migrationBuilder.AddForeignKey( name: "FK_ShiftPlans_Users_SupervisorId", schema: "public", table: "ShiftPlans", column: "SupervisorId", principalSchema: "public", principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_ShiftPlans_Users_SupervisorId", schema: "public", table: "ShiftPlans"); migrationBuilder.DropIndex( name: "IX_ShiftPlans_SupervisorId", schema: "public", table: "ShiftPlans"); migrationBuilder.DropColumn( name: "SupervisorId", schema: "public", table: "ShiftPlans"); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskShifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskShifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskShifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Tasks", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Tasks", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Tasks", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskPositions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskPositions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskPositions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "TaskDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "TaskDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "TaskDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Shifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Shifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Shifts", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftRoutines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftPlanUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftPlans", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ShiftDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ShiftDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ShiftDays", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Sections", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Sections", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Sections", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Routines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Routines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Routines", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Positions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Positions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Positions", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ComplexUsers", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "ComplexUserRoles", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "RemovedBy", schema: "public", table: "Complexes", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "ModifiedBy", schema: "public", table: "Complexes", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "CreatedBy", schema: "public", table: "Complexes", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); } } }