using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PostFundManagement.Infrastructure.Database.Migrations
{
///
public partial class SetChangesColumnToTestArrayOnAuditLog : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Activities_Milestones_MilestoneId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Projects_ProjectId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Tenants_TenantId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_ApproverId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_CreatorId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_UpdatorId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Organisations_OrganisationId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Programmes_ProgrammeId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Projects_ProjectId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Tenants_TenantId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_ApproverId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_CreatorId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_UpdatorId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Projects_ProjectId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Tenants_TenantId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Users_CreatedBy",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Users_UserId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Projects_ProjectId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Tenants_TenantId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Users_ApproverId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Users_CreatorId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Projects_ProjectId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Tenants_TenantId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Users_ApproverId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Users_CreatorId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Projects_ProjectId",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Users_CreatorId",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Users_VerifierId",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Awards_AwardId",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Tenants_TenantId",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Users_CreatorId",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Milestones_MilestoneId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Projects_ProjectId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Tenants_TenantId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Users_CreatorId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Users_UpdatorId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Activities_ActivityId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Indicators_IndicatorId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Milestones_MilestoneId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Projects_ProjectId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Tenants_TenantId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Users_CreatorId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Users_UpdatorId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Projects_ProjectId",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Tenants_TenantId",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Users_CreatorId",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Programmes_ProgrammeId",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Tenants_TenantId",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Users_CreatorId",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Awards_AwardId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Contracts_ContractId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Organisations_InvitedOrganisationId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Organisations_OrganisationId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Tenants_TenantId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Users_RecipientUserId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Projects_ProjectId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Tenants_TenantId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Users_AssigneeId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Users_CreatorId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Projects_ProjectId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Tenants_TenantId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Users_CreatorId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Users_UpdatorId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Organisations_OrganisationId",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Tenants_TenantId",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Users_RecipientUserId",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Organisations_Users_CreatorId",
table: "Organisations");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Beneficiaries_BeneficiaryId",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Tenants_TenantId",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Users_CreatorId",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Organisations_OrganisationId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Tenants_TenantId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Users_CreatorId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Users_OwnerId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Portfolios_PortfolioId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Tenants_TenantId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Users_CreatorId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Users_OwnerId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Programmes_ProgrammeId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Tenants_TenantId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Users_CreatorId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Users_UpdatorId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Projects_ProjectId",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Tenants_TenantId",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Users_CreatorId",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Programmes_ProgrammeId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Tenants_TenantId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Users_CreatorId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Users_UpdatorId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Projects_ProjectId",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Tenants_TenantId",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Users_CreatorId",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Organisations_OrganisationId",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Tenants_TenantId",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Users_CreatorId",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_Tenants_Users_CreatorId",
table: "Tenants");
migrationBuilder.DropForeignKey(
name: "FK_Tenants_Users_UpdatorId",
table: "Tenants");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Tenants_TenantId",
table: "TenantUsers");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Users_CreatedBy",
table: "TenantUsers");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Users_UserId",
table: "TenantUsers");
migrationBuilder.DropIndex(
name: "IX_Tenants_CreatorId",
table: "Tenants");
migrationBuilder.DropIndex(
name: "IX_Tenants_UpdatorId",
table: "Tenants");
migrationBuilder.DropIndex(
name: "IX_TenantOrganisations_CreatorId",
table: "TenantOrganisations");
migrationBuilder.DropIndex(
name: "IX_SiteVisits_CreatorId",
table: "SiteVisits");
migrationBuilder.DropIndex(
name: "IX_Rules_CreatorId",
table: "Rules");
migrationBuilder.DropIndex(
name: "IX_Rules_UpdatorId",
table: "Rules");
migrationBuilder.DropIndex(
name: "IX_Risks_CreatorId",
table: "Risks");
migrationBuilder.DropIndex(
name: "IX_Projects_CreatorId",
table: "Projects");
migrationBuilder.DropIndex(
name: "IX_Projects_UpdatorId",
table: "Projects");
migrationBuilder.DropIndex(
name: "IX_Programmes_CreatorId",
table: "Programmes");
migrationBuilder.DropIndex(
name: "IX_Programmes_OwnerId",
table: "Programmes");
migrationBuilder.DropIndex(
name: "IX_Portfolios_CreatorId",
table: "Portfolios");
migrationBuilder.DropIndex(
name: "IX_Portfolios_OwnerId",
table: "Portfolios");
migrationBuilder.DropIndex(
name: "IX_Outcomes_CreatorId",
table: "Outcomes");
migrationBuilder.DropIndex(
name: "IX_Organisations_CreatorId",
table: "Organisations");
migrationBuilder.DropIndex(
name: "IX_Notifications_RecipientUserId",
table: "Notifications");
migrationBuilder.DropIndex(
name: "IX_Milestones_CreatorId",
table: "Milestones");
migrationBuilder.DropIndex(
name: "IX_Milestones_UpdatorId",
table: "Milestones");
migrationBuilder.DropIndex(
name: "IX_Issues_AssigneeId",
table: "Issues");
migrationBuilder.DropIndex(
name: "IX_Issues_CreatorId",
table: "Issues");
migrationBuilder.DropIndex(
name: "IX_Invites_RecipientUserId",
table: "Invites");
migrationBuilder.DropIndex(
name: "IX_Instruments_CreatorId",
table: "Instruments");
migrationBuilder.DropIndex(
name: "IX_Indicators_CreatorId",
table: "Indicators");
migrationBuilder.DropIndex(
name: "IX_Evidences_CreatorId",
table: "Evidences");
migrationBuilder.DropIndex(
name: "IX_Evidences_UpdatorId",
table: "Evidences");
migrationBuilder.DropIndex(
name: "IX_Disbursements_CreatorId",
table: "Disbursements");
migrationBuilder.DropIndex(
name: "IX_Disbursements_UpdatorId",
table: "Disbursements");
migrationBuilder.DropIndex(
name: "IX_Contracts_CreatorId",
table: "Contracts");
migrationBuilder.DropIndex(
name: "IX_ComplianceItems_CreatorId",
table: "ComplianceItems");
migrationBuilder.DropIndex(
name: "IX_ComplianceItems_VerifierId",
table: "ComplianceItems");
migrationBuilder.DropIndex(
name: "IX_ChangeRequests_ApproverId",
table: "ChangeRequests");
migrationBuilder.DropIndex(
name: "IX_ChangeRequests_CreatorId",
table: "ChangeRequests");
migrationBuilder.DropIndex(
name: "IX_Budgets_ApproverId",
table: "Budgets");
migrationBuilder.DropIndex(
name: "IX_Budgets_CreatorId",
table: "Budgets");
migrationBuilder.DropIndex(
name: "IX_Awards_ApproverId",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Awards_CreatorId",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Awards_UpdatorId",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Activities_ApproverId",
table: "Activities");
migrationBuilder.DropIndex(
name: "IX_Activities_CreatorId",
table: "Activities");
migrationBuilder.DropIndex(
name: "IX_Activities_UpdatorId",
table: "Activities");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Tenants");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Tenants");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "TenantOrganisations");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "SiteVisits");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Rules");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Rules");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Risks");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Projects");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Projects");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Programmes");
migrationBuilder.DropColumn(
name: "OwnerId",
table: "Programmes");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Portfolios");
migrationBuilder.DropColumn(
name: "OwnerId",
table: "Portfolios");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Outcomes");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Organisations");
migrationBuilder.DropColumn(
name: "RecipientUserId",
table: "Notifications");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Milestones");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Milestones");
migrationBuilder.DropColumn(
name: "AssigneeId",
table: "Issues");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Issues");
migrationBuilder.DropColumn(
name: "RecipientUserId",
table: "Invites");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Instruments");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Indicators");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Evidences");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Evidences");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Disbursements");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Disbursements");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Contracts");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "ComplianceItems");
migrationBuilder.DropColumn(
name: "VerifierId",
table: "ComplianceItems");
migrationBuilder.DropColumn(
name: "ApproverId",
table: "ChangeRequests");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "ChangeRequests");
migrationBuilder.DropColumn(
name: "ApproverId",
table: "Budgets");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Budgets");
migrationBuilder.DropColumn(
name: "ApproverId",
table: "Awards");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Awards");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Awards");
migrationBuilder.DropColumn(
name: "ApproverId",
table: "Activities");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "Activities");
migrationBuilder.DropColumn(
name: "UpdatorId",
table: "Activities");
migrationBuilder.AlterColumn(
name: "Status",
table: "Users",
type: "integer",
nullable: false,
defaultValueSql: "2",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Email",
table: "Users",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "TenantUsers",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "TenantUsers",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Tenants",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Tenants",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Tenants",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "TenantOrganisations",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "TenantOrganisations",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "SiteVisits",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "InspectorName",
table: "SiteVisits",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Findings",
table: "SiteVisits",
type: "character varying(4096)",
maxLength: 4096,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "SiteVisits",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Version",
table: "Rules",
type: "integer",
nullable: false,
defaultValue: 1,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Status",
table: "Rules",
type: "integer",
nullable: false,
defaultValueSql: "2",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Rules",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Rules",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Name",
table: "Risks",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Likelihood",
table: "Risks",
type: "integer",
nullable: false,
defaultValueSql: "3",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Impact",
table: "Risks",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Description",
table: "Risks",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Risks",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Projects",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Sector",
table: "Projects",
type: "integer",
nullable: false,
defaultValueSql: "11",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "ProjectType",
table: "Projects",
type: "integer",
nullable: false,
defaultValueSql: "10",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Projects",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Projects",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Projects",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Programmes",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Programmes",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Programmes",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Name",
table: "Portfolios",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Portfolios",
type: "character varying(1024)",
maxLength: 1024,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Portfolios",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Name",
table: "Outcomes",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Outcomes",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Outcomes",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Type",
table: "Organisations",
type: "integer",
nullable: false,
defaultValueSql: "5",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Status",
table: "Organisations",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "RegistrationNo",
table: "Organisations",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Organisations",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Email",
table: "Organisations",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Organisations",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Subject",
table: "Notifications",
type: "character varying(256)",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Notifications",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Platform",
table: "Notifications",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Message",
table: "Notifications",
type: "character varying(4096)",
maxLength: 4096,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Destination",
table: "Notifications",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Notifications",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Milestones",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Priority",
table: "Milestones",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Milestones",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Milestones",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Title",
table: "Issues",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Issues",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Resolution",
table: "Issues",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Priority",
table: "Issues",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Description",
table: "Issues",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Issues",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Invites",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Instruments",
type: "integer",
nullable: false,
defaultValueSql: "2",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Name",
table: "Instruments",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Instruments",
type: "character varying(1024)",
maxLength: 1024,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Instruments",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Code",
table: "Instruments",
type: "character varying(100)",
maxLength: 100,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "UnitOfMeasure",
table: "Indicators",
type: "integer",
nullable: false,
defaultValueSql: "2",
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "TargetAmount",
table: "Indicators",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "Name",
table: "Indicators",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Indicators",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "BaselineAmount",
table: "Indicators",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "ActualAmount",
table: "Indicators",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "Version",
table: "Evidences",
type: "integer",
nullable: false,
defaultValue: 1,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "UpdatedBy",
table: "Evidences",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Type",
table: "Evidences",
type: "integer",
nullable: false,
defaultValueSql: "9",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Status",
table: "Evidences",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "DocumentUrl",
table: "Evidences",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Evidences",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Status",
table: "Disbursements",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Disbursements",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Disbursements",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "TotalValue",
table: "Contracts",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "Status",
table: "Contracts",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Contracts",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Title",
table: "ComplianceItems",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "ComplianceItems",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "Requirements",
table: "ComplianceItems",
type: "character varying(2048)",
maxLength: 2048,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "ComplianceItems",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Title",
table: "ChangeRequests",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "ChangeRequests",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "RevisedBudget",
table: "ChangeRequests",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: true,
oldClrType: typeof(decimal),
oldType: "numeric",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Justification",
table: "ChangeRequests",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "ChangeRequests",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Name",
table: "Budgets",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Budgets",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Budgets",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "Name",
table: "Beneficiaries",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Location",
table: "Beneficiaries",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Beneficiaries",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Category",
table: "Beneficiaries",
type: "character varying(100)",
maxLength: 100,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Awards",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Awards",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Awards",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.AlterColumn(
name: "Timestamp",
table: "AuditLogs",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "EntityName",
table: "AuditLogs",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "EntityId",
table: "AuditLogs",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Action",
table: "AuditLogs",
type: "character varying(100)",
maxLength: 100,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AddColumn(
name: "Changes",
table: "AuditLogs",
type: "text[]",
nullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "Activities",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Activities",
type: "integer",
nullable: false,
defaultValueSql: "1",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "ProjectId",
table: "Activities",
type: "bigint",
nullable: false,
defaultValue: 0L,
oldClrType: typeof(long),
oldType: "bigint",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "MilestoneId",
table: "Activities",
type: "bigint",
nullable: false,
defaultValue: 0L,
oldClrType: typeof(long),
oldType: "bigint",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Activities",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Activities",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Category",
table: "Activities",
type: "character varying(256)",
maxLength: 256,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Amount",
table: "Activities",
type: "numeric(18,2)",
precision: 18,
scale: 2,
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric");
migrationBuilder.CreateIndex(
name: "IX_Tenants_CreatedBy",
table: "Tenants",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Tenants_UpdatedBy",
table: "Tenants",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_TenantOrganisations_CreatedBy",
table: "TenantOrganisations",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_SiteVisits_CreatedBy",
table: "SiteVisits",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Rules_CreatedBy",
table: "Rules",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Rules_UpdatedBy",
table: "Rules",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Risks_CreatedBy",
table: "Risks",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Projects_CreatedBy",
table: "Projects",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Projects_UpdatedBy",
table: "Projects",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Programmes_CreatedBy",
table: "Programmes",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Programmes_OwnedBy",
table: "Programmes",
column: "OwnedBy");
migrationBuilder.CreateIndex(
name: "IX_Portfolios_CreatedBy",
table: "Portfolios",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Portfolios_OwnedBy",
table: "Portfolios",
column: "OwnedBy");
migrationBuilder.CreateIndex(
name: "IX_Outcomes_CreatedBy",
table: "Outcomes",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Organisations_CreatedBy",
table: "Organisations",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Notifications_Recipient",
table: "Notifications",
column: "Recipient");
migrationBuilder.CreateIndex(
name: "IX_Milestones_CreatedBy",
table: "Milestones",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Milestones_UpdatedBy",
table: "Milestones",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Issues_AssignedTo",
table: "Issues",
column: "AssignedTo");
migrationBuilder.CreateIndex(
name: "IX_Issues_CreatedBy",
table: "Issues",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Invites_Recipient",
table: "Invites",
column: "Recipient");
migrationBuilder.CreateIndex(
name: "IX_Instruments_CreatedBy",
table: "Instruments",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Indicators_CreatedBy",
table: "Indicators",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Evidences_CreatedBy",
table: "Evidences",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Evidences_UpdatedBy",
table: "Evidences",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Disbursements_CreatedBy",
table: "Disbursements",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Disbursements_UpdatedBy",
table: "Disbursements",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Contracts_CreatedBy",
table: "Contracts",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_ComplianceItems_CreatedBy",
table: "ComplianceItems",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_ComplianceItems_VerifiedBy",
table: "ComplianceItems",
column: "VerifiedBy");
migrationBuilder.CreateIndex(
name: "IX_ChangeRequests_ApprovedBy",
table: "ChangeRequests",
column: "ApprovedBy");
migrationBuilder.CreateIndex(
name: "IX_ChangeRequests_CreatedBy",
table: "ChangeRequests",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Budgets_ApprovedBy",
table: "Budgets",
column: "ApprovedBy");
migrationBuilder.CreateIndex(
name: "IX_Budgets_CreatedBy",
table: "Budgets",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Awards_ApprovedBy",
table: "Awards",
column: "ApprovedBy");
migrationBuilder.CreateIndex(
name: "IX_Awards_CreatedBy",
table: "Awards",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Awards_UpdatedBy",
table: "Awards",
column: "UpdatedBy");
migrationBuilder.CreateIndex(
name: "IX_Activities_ApprovedBy",
table: "Activities",
column: "ApprovedBy");
migrationBuilder.CreateIndex(
name: "IX_Activities_CreatedBy",
table: "Activities",
column: "CreatedBy");
migrationBuilder.CreateIndex(
name: "IX_Activities_UpdatedBy",
table: "Activities",
column: "UpdatedBy");
migrationBuilder.AddForeignKey(
name: "FK_Activities_Milestones_MilestoneId",
table: "Activities",
column: "MilestoneId",
principalTable: "Milestones",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Activities_Projects_ProjectId",
table: "Activities",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Activities_Tenants_TenantId",
table: "Activities",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Activities_Users_ApprovedBy",
table: "Activities",
column: "ApprovedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Activities_Users_CreatedBy",
table: "Activities",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Activities_Users_UpdatedBy",
table: "Activities",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Awards_Organisations_OrganisationId",
table: "Awards",
column: "OrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Awards_Programmes_ProgrammeId",
table: "Awards",
column: "ProgrammeId",
principalTable: "Programmes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Awards_Projects_ProjectId",
table: "Awards",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
migrationBuilder.AddForeignKey(
name: "FK_Awards_Tenants_TenantId",
table: "Awards",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Awards_Users_ApprovedBy",
table: "Awards",
column: "ApprovedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Awards_Users_CreatedBy",
table: "Awards",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Awards_Users_UpdatedBy",
table: "Awards",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Beneficiaries_Projects_ProjectId",
table: "Beneficiaries",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Beneficiaries_Tenants_TenantId",
table: "Beneficiaries",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Beneficiaries_Users_CreatedBy",
table: "Beneficiaries",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Beneficiaries_Users_UserId",
table: "Beneficiaries",
column: "UserId",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Budgets_Projects_ProjectId",
table: "Budgets",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Budgets_Tenants_TenantId",
table: "Budgets",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Budgets_Users_ApprovedBy",
table: "Budgets",
column: "ApprovedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Budgets_Users_CreatedBy",
table: "Budgets",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ChangeRequests_Projects_ProjectId",
table: "ChangeRequests",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ChangeRequests_Tenants_TenantId",
table: "ChangeRequests",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ChangeRequests_Users_ApprovedBy",
table: "ChangeRequests",
column: "ApprovedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ChangeRequests_Users_CreatedBy",
table: "ChangeRequests",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ComplianceItems_Projects_ProjectId",
table: "ComplianceItems",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ComplianceItems_Users_CreatedBy",
table: "ComplianceItems",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ComplianceItems_Users_VerifiedBy",
table: "ComplianceItems",
column: "VerifiedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Contracts_Awards_AwardId",
table: "Contracts",
column: "AwardId",
principalTable: "Awards",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Contracts_Tenants_TenantId",
table: "Contracts",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Contracts_Users_CreatedBy",
table: "Contracts",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Disbursements_Milestones_MilestoneId",
table: "Disbursements",
column: "MilestoneId",
principalTable: "Milestones",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Disbursements_Projects_ProjectId",
table: "Disbursements",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Disbursements_Tenants_TenantId",
table: "Disbursements",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Disbursements_Users_CreatedBy",
table: "Disbursements",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Disbursements_Users_UpdatedBy",
table: "Disbursements",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Activities_ActivityId",
table: "Evidences",
column: "ActivityId",
principalTable: "Activities",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Indicators_IndicatorId",
table: "Evidences",
column: "IndicatorId",
principalTable: "Indicators",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Milestones_MilestoneId",
table: "Evidences",
column: "MilestoneId",
principalTable: "Milestones",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Projects_ProjectId",
table: "Evidences",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Tenants_TenantId",
table: "Evidences",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Users_CreatedBy",
table: "Evidences",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Evidences_Users_UpdatedBy",
table: "Evidences",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Indicators_Projects_ProjectId",
table: "Indicators",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Indicators_Tenants_TenantId",
table: "Indicators",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Indicators_Users_CreatedBy",
table: "Indicators",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Instruments_Programmes_ProgrammeId",
table: "Instruments",
column: "ProgrammeId",
principalTable: "Programmes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Instruments_Tenants_TenantId",
table: "Instruments",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Instruments_Users_CreatedBy",
table: "Instruments",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Invites_Awards_AwardId",
table: "Invites",
column: "AwardId",
principalTable: "Awards",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Invites_Contracts_ContractId",
table: "Invites",
column: "ContractId",
principalTable: "Contracts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Invites_Organisations_InvitedOrganisationId",
table: "Invites",
column: "InvitedOrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Invites_Organisations_OrganisationId",
table: "Invites",
column: "OrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Invites_Tenants_TenantId",
table: "Invites",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Invites_Users_Recipient",
table: "Invites",
column: "Recipient",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Issues_Projects_ProjectId",
table: "Issues",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Issues_Tenants_TenantId",
table: "Issues",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Issues_Users_AssignedTo",
table: "Issues",
column: "AssignedTo",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
migrationBuilder.AddForeignKey(
name: "FK_Issues_Users_CreatedBy",
table: "Issues",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Milestones_Projects_ProjectId",
table: "Milestones",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Milestones_Tenants_TenantId",
table: "Milestones",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Milestones_Users_CreatedBy",
table: "Milestones",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Milestones_Users_UpdatedBy",
table: "Milestones",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Notifications_Organisations_OrganisationId",
table: "Notifications",
column: "OrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Notifications_Tenants_TenantId",
table: "Notifications",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Notifications_Users_Recipient",
table: "Notifications",
column: "Recipient",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Organisations_Users_CreatedBy",
table: "Organisations",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Outcomes_Beneficiaries_BeneficiaryId",
table: "Outcomes",
column: "BeneficiaryId",
principalTable: "Beneficiaries",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Outcomes_Tenants_TenantId",
table: "Outcomes",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Outcomes_Users_CreatedBy",
table: "Outcomes",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Portfolios_Organisations_OrganisationId",
table: "Portfolios",
column: "OrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Portfolios_Tenants_TenantId",
table: "Portfolios",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Portfolios_Users_CreatedBy",
table: "Portfolios",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Portfolios_Users_OwnedBy",
table: "Portfolios",
column: "OwnedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Programmes_Portfolios_PortfolioId",
table: "Programmes",
column: "PortfolioId",
principalTable: "Portfolios",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Programmes_Tenants_TenantId",
table: "Programmes",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Programmes_Users_CreatedBy",
table: "Programmes",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Programmes_Users_OwnedBy",
table: "Programmes",
column: "OwnedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Projects_Programmes_ProgrammeId",
table: "Projects",
column: "ProgrammeId",
principalTable: "Programmes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Projects_Tenants_TenantId",
table: "Projects",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Projects_Users_CreatedBy",
table: "Projects",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Projects_Users_UpdatedBy",
table: "Projects",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Risks_Projects_ProjectId",
table: "Risks",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Risks_Tenants_TenantId",
table: "Risks",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Risks_Users_CreatedBy",
table: "Risks",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Rules_Programmes_ProgrammeId",
table: "Rules",
column: "ProgrammeId",
principalTable: "Programmes",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Rules_Tenants_TenantId",
table: "Rules",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Rules_Users_CreatedBy",
table: "Rules",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Rules_Users_UpdatedBy",
table: "Rules",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_SiteVisits_Projects_ProjectId",
table: "SiteVisits",
column: "ProjectId",
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_SiteVisits_Tenants_TenantId",
table: "SiteVisits",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_SiteVisits_Users_CreatedBy",
table: "SiteVisits",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_TenantOrganisations_Organisations_OrganisationId",
table: "TenantOrganisations",
column: "OrganisationId",
principalTable: "Organisations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_TenantOrganisations_Tenants_TenantId",
table: "TenantOrganisations",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_TenantOrganisations_Users_CreatedBy",
table: "TenantOrganisations",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Tenants_Users_CreatedBy",
table: "Tenants",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Tenants_Users_UpdatedBy",
table: "Tenants",
column: "UpdatedBy",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_TenantUsers_Tenants_TenantId",
table: "TenantUsers",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_TenantUsers_Users_CreatedBy",
table: "TenantUsers",
column: "CreatedBy",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_TenantUsers_Users_UserId",
table: "TenantUsers",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Activities_Milestones_MilestoneId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Projects_ProjectId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Tenants_TenantId",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_ApprovedBy",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_CreatedBy",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Activities_Users_UpdatedBy",
table: "Activities");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Organisations_OrganisationId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Programmes_ProgrammeId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Projects_ProjectId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Tenants_TenantId",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_ApprovedBy",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_CreatedBy",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Awards_Users_UpdatedBy",
table: "Awards");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Projects_ProjectId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Tenants_TenantId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Users_CreatedBy",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Beneficiaries_Users_UserId",
table: "Beneficiaries");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Projects_ProjectId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Tenants_TenantId",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Users_ApprovedBy",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_Budgets_Users_CreatedBy",
table: "Budgets");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Projects_ProjectId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Tenants_TenantId",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Users_ApprovedBy",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ChangeRequests_Users_CreatedBy",
table: "ChangeRequests");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Projects_ProjectId",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Users_CreatedBy",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_ComplianceItems_Users_VerifiedBy",
table: "ComplianceItems");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Awards_AwardId",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Tenants_TenantId",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Contracts_Users_CreatedBy",
table: "Contracts");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Milestones_MilestoneId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Projects_ProjectId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Tenants_TenantId",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Users_CreatedBy",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Disbursements_Users_UpdatedBy",
table: "Disbursements");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Activities_ActivityId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Indicators_IndicatorId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Milestones_MilestoneId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Projects_ProjectId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Tenants_TenantId",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Users_CreatedBy",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Evidences_Users_UpdatedBy",
table: "Evidences");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Projects_ProjectId",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Tenants_TenantId",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Indicators_Users_CreatedBy",
table: "Indicators");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Programmes_ProgrammeId",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Tenants_TenantId",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Instruments_Users_CreatedBy",
table: "Instruments");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Awards_AwardId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Contracts_ContractId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Organisations_InvitedOrganisationId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Organisations_OrganisationId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Tenants_TenantId",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Invites_Users_Recipient",
table: "Invites");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Projects_ProjectId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Tenants_TenantId",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Users_AssignedTo",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Issues_Users_CreatedBy",
table: "Issues");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Projects_ProjectId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Tenants_TenantId",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Users_CreatedBy",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Milestones_Users_UpdatedBy",
table: "Milestones");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Organisations_OrganisationId",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Tenants_TenantId",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Notifications_Users_Recipient",
table: "Notifications");
migrationBuilder.DropForeignKey(
name: "FK_Organisations_Users_CreatedBy",
table: "Organisations");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Beneficiaries_BeneficiaryId",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Tenants_TenantId",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Users_CreatedBy",
table: "Outcomes");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Organisations_OrganisationId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Tenants_TenantId",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Users_CreatedBy",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Portfolios_Users_OwnedBy",
table: "Portfolios");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Portfolios_PortfolioId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Tenants_TenantId",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Users_CreatedBy",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Programmes_Users_OwnedBy",
table: "Programmes");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Programmes_ProgrammeId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Tenants_TenantId",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Users_CreatedBy",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Projects_Users_UpdatedBy",
table: "Projects");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Projects_ProjectId",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Tenants_TenantId",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Risks_Users_CreatedBy",
table: "Risks");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Programmes_ProgrammeId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Tenants_TenantId",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Users_CreatedBy",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_Rules_Users_UpdatedBy",
table: "Rules");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Projects_ProjectId",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Tenants_TenantId",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_SiteVisits_Users_CreatedBy",
table: "SiteVisits");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Organisations_OrganisationId",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Tenants_TenantId",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_TenantOrganisations_Users_CreatedBy",
table: "TenantOrganisations");
migrationBuilder.DropForeignKey(
name: "FK_Tenants_Users_CreatedBy",
table: "Tenants");
migrationBuilder.DropForeignKey(
name: "FK_Tenants_Users_UpdatedBy",
table: "Tenants");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Tenants_TenantId",
table: "TenantUsers");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Users_CreatedBy",
table: "TenantUsers");
migrationBuilder.DropForeignKey(
name: "FK_TenantUsers_Users_UserId",
table: "TenantUsers");
migrationBuilder.DropIndex(
name: "IX_Tenants_CreatedBy",
table: "Tenants");
migrationBuilder.DropIndex(
name: "IX_Tenants_UpdatedBy",
table: "Tenants");
migrationBuilder.DropIndex(
name: "IX_TenantOrganisations_CreatedBy",
table: "TenantOrganisations");
migrationBuilder.DropIndex(
name: "IX_SiteVisits_CreatedBy",
table: "SiteVisits");
migrationBuilder.DropIndex(
name: "IX_Rules_CreatedBy",
table: "Rules");
migrationBuilder.DropIndex(
name: "IX_Rules_UpdatedBy",
table: "Rules");
migrationBuilder.DropIndex(
name: "IX_Risks_CreatedBy",
table: "Risks");
migrationBuilder.DropIndex(
name: "IX_Projects_CreatedBy",
table: "Projects");
migrationBuilder.DropIndex(
name: "IX_Projects_UpdatedBy",
table: "Projects");
migrationBuilder.DropIndex(
name: "IX_Programmes_CreatedBy",
table: "Programmes");
migrationBuilder.DropIndex(
name: "IX_Programmes_OwnedBy",
table: "Programmes");
migrationBuilder.DropIndex(
name: "IX_Portfolios_CreatedBy",
table: "Portfolios");
migrationBuilder.DropIndex(
name: "IX_Portfolios_OwnedBy",
table: "Portfolios");
migrationBuilder.DropIndex(
name: "IX_Outcomes_CreatedBy",
table: "Outcomes");
migrationBuilder.DropIndex(
name: "IX_Organisations_CreatedBy",
table: "Organisations");
migrationBuilder.DropIndex(
name: "IX_Notifications_Recipient",
table: "Notifications");
migrationBuilder.DropIndex(
name: "IX_Milestones_CreatedBy",
table: "Milestones");
migrationBuilder.DropIndex(
name: "IX_Milestones_UpdatedBy",
table: "Milestones");
migrationBuilder.DropIndex(
name: "IX_Issues_AssignedTo",
table: "Issues");
migrationBuilder.DropIndex(
name: "IX_Issues_CreatedBy",
table: "Issues");
migrationBuilder.DropIndex(
name: "IX_Invites_Recipient",
table: "Invites");
migrationBuilder.DropIndex(
name: "IX_Instruments_CreatedBy",
table: "Instruments");
migrationBuilder.DropIndex(
name: "IX_Indicators_CreatedBy",
table: "Indicators");
migrationBuilder.DropIndex(
name: "IX_Evidences_CreatedBy",
table: "Evidences");
migrationBuilder.DropIndex(
name: "IX_Evidences_UpdatedBy",
table: "Evidences");
migrationBuilder.DropIndex(
name: "IX_Disbursements_CreatedBy",
table: "Disbursements");
migrationBuilder.DropIndex(
name: "IX_Disbursements_UpdatedBy",
table: "Disbursements");
migrationBuilder.DropIndex(
name: "IX_Contracts_CreatedBy",
table: "Contracts");
migrationBuilder.DropIndex(
name: "IX_ComplianceItems_CreatedBy",
table: "ComplianceItems");
migrationBuilder.DropIndex(
name: "IX_ComplianceItems_VerifiedBy",
table: "ComplianceItems");
migrationBuilder.DropIndex(
name: "IX_ChangeRequests_ApprovedBy",
table: "ChangeRequests");
migrationBuilder.DropIndex(
name: "IX_ChangeRequests_CreatedBy",
table: "ChangeRequests");
migrationBuilder.DropIndex(
name: "IX_Budgets_ApprovedBy",
table: "Budgets");
migrationBuilder.DropIndex(
name: "IX_Budgets_CreatedBy",
table: "Budgets");
migrationBuilder.DropIndex(
name: "IX_Awards_ApprovedBy",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Awards_CreatedBy",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Awards_UpdatedBy",
table: "Awards");
migrationBuilder.DropIndex(
name: "IX_Activities_ApprovedBy",
table: "Activities");
migrationBuilder.DropIndex(
name: "IX_Activities_CreatedBy",
table: "Activities");
migrationBuilder.DropIndex(
name: "IX_Activities_UpdatedBy",
table: "Activities");
migrationBuilder.DropColumn(
name: "Changes",
table: "AuditLogs");
migrationBuilder.AlterColumn(
name: "Status",
table: "Users",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "2");
migrationBuilder.AlterColumn(
name: "Email",
table: "Users",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Status",
table: "TenantUsers",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "TenantUsers",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Status",
table: "Tenants",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Name",
table: "Tenants",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Tenants",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Tenants",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Tenants",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "TenantOrganisations",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "TenantOrganisations",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "TenantOrganisations",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "SiteVisits",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "InspectorName",
table: "SiteVisits",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Findings",
table: "SiteVisits",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(4096)",
oldMaxLength: 4096,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "SiteVisits",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "SiteVisits",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Version",
table: "Rules",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 1);
migrationBuilder.AlterColumn(
name: "Status",
table: "Rules",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "2");
migrationBuilder.AlterColumn(
name: "Name",
table: "Rules",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Rules",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Rules",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Rules",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Risks",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Likelihood",
table: "Risks",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "3");
migrationBuilder.AlterColumn(
name: "Impact",
table: "Risks",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Description",
table: "Risks",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Risks",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Risks",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Projects",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Sector",
table: "Projects",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "11");
migrationBuilder.AlterColumn(
name: "ProjectType",
table: "Projects",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "10");
migrationBuilder.AlterColumn(
name: "Name",
table: "Projects",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Description",
table: "Projects",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Projects",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Projects",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Projects",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Programmes",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Name",
table: "Programmes",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Programmes",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Programmes",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "OwnerId",
table: "Programmes",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Portfolios",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Description",
table: "Portfolios",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Portfolios",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Portfolios",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "OwnerId",
table: "Portfolios",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Outcomes",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Description",
table: "Outcomes",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Outcomes",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Outcomes",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Type",
table: "Organisations",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "5");
migrationBuilder.AlterColumn(
name: "Status",
table: "Organisations",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "RegistrationNo",
table: "Organisations",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Name",
table: "Organisations",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Email",
table: "Organisations",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Organisations",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Organisations",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Subject",
table: "Notifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Notifications",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Platform",
table: "Notifications",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Message",
table: "Notifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(4096)",
oldMaxLength: 4096);
migrationBuilder.AlterColumn(
name: "Destination",
table: "Notifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Notifications",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "RecipientUserId",
table: "Notifications",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Milestones",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Priority",
table: "Milestones",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Name",
table: "Milestones",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Milestones",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Milestones",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Milestones",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "Issues",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Status",
table: "Issues",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Resolution",
table: "Issues",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Priority",
table: "Issues",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Description",
table: "Issues",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Issues",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "AssigneeId",
table: "Issues",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Issues",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Invites",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "RecipientUserId",
table: "Invites",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Instruments",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "2");
migrationBuilder.AlterColumn(
name: "Name",
table: "Instruments",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Description",
table: "Instruments",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Instruments",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Code",
table: "Instruments",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Instruments",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "UnitOfMeasure",
table: "Indicators",
type: "integer",
nullable: true,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "2");
migrationBuilder.AlterColumn(
name: "TargetAmount",
table: "Indicators",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AlterColumn(
name: "Name",
table: "Indicators",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Indicators",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "BaselineAmount",
table: "Indicators",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AlterColumn(
name: "ActualAmount",
table: "Indicators",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Indicators",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Version",
table: "Evidences",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 1);
migrationBuilder.AlterColumn(
name: "UpdatedBy",
table: "Evidences",
type: "uuid",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AlterColumn(
name: "Type",
table: "Evidences",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "9");
migrationBuilder.AlterColumn(
name: "Status",
table: "Evidences",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "DocumentUrl",
table: "Evidences",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Evidences",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Evidences",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Evidences",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Status",
table: "Disbursements",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Disbursements",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Disbursements",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Disbursements",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Disbursements",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "TotalValue",
table: "Contracts",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AlterColumn(
name: "Status",
table: "Contracts",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Contracts",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Contracts",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "ComplianceItems",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Status",
table: "ComplianceItems",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "Requirements",
table: "ComplianceItems",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(2048)",
oldMaxLength: 2048);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "ComplianceItems",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "CreatorId",
table: "ComplianceItems",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "VerifierId",
table: "ComplianceItems",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "ChangeRequests",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Status",
table: "ChangeRequests",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "RevisedBudget",
table: "ChangeRequests",
type: "numeric",
nullable: true,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Justification",
table: "ChangeRequests",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "ChangeRequests",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AddColumn(
name: "ApproverId",
table: "ChangeRequests",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "ChangeRequests",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Budgets",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Budgets",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Budgets",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AddColumn(
name: "ApproverId",
table: "Budgets",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Budgets",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Beneficiaries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn(
name: "Location",
table: "Beneficiaries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Beneficiaries",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Category",
table: "Beneficiaries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100);
migrationBuilder.AlterColumn(
name: "Status",
table: "Awards",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValueSql: "1");
migrationBuilder.AlterColumn(
name: "CreatedAt",
table: "Awards",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldDefaultValueSql: "now()");
migrationBuilder.AlterColumn(
name: "Amount",
table: "Awards",
type: "numeric",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(18,2)",
oldPrecision: 18,
oldScale: 2);
migrationBuilder.AddColumn(
name: "ApproverId",
table: "Awards",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "CreatorId",
table: "Awards",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "UpdatorId",
table: "Awards",
type: "uuid",
nullable: true);
migrationBuilder.AlterColumn