using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ColaFlow.Modules.ProjectManagement.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddTenantIdToProject : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "TenantId",
                schema: "project_management",
                table: "Projects",
                type: "uuid",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

            migrationBuilder.CreateIndex(
                name: "IX_Projects_TenantId",
                schema: "project_management",
                table: "Projects",
                column: "TenantId");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Projects_TenantId",
                schema: "project_management",
                table: "Projects");

            migrationBuilder.DropColumn(
                name: "TenantId",
                schema: "project_management",
                table: "Projects");
        }
    }
}
