79 lines
3.2 KiB
C#
79 lines
3.2 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Added_IsActive_In_ServiceMaster : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsActive",
|
|
table: "ServiceMasters",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsActive",
|
|
table: "ActivityGroupMasters",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "Features",
|
|
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
|
values: new object[] { new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), "Managing all organization related rights", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Organization Management" });
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "FeaturePermissions",
|
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"), "Allow user to create new organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Add Organization" },
|
|
{ new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"), "Allow the user to view information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "View Organization" },
|
|
{ new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"), "Allow the user to update the basic information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Edit Organization" }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "FeaturePermissions",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "FeaturePermissions",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "FeaturePermissions",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "Features",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"));
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsActive",
|
|
table: "ServiceMasters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsActive",
|
|
table: "ActivityGroupMasters");
|
|
}
|
|
}
|
|
}
|