context: using System;
  using System.Collections.Generic;
  using Microsoft.Data.Entity.Migrations;
  using Microsoft.Data.Entity.Metadata;
  
  namespace Nocturno.Data.Migrations
  {
      public partial class Initial : Migration
      {
          protected override void Up(MigrationBuilder migrationBuilder)
          {
              migrationBuilder.CreateTable(
                  name: "AspNetRoles",
                  columns: table => new
                  {
                      Id = table.Column<string>(nullable: false),
                      ConcurrencyStamp = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true),
                      NormalizedName = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_IdentityRole", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "AspNetUsers",
                  columns: table => new
                  {
                      Id = table.Column<string>(nullable: false),
                      AccessFailedCount = table.Column<int>(nullable: false),
                      ConcurrencyStamp = table.Column<string>(nullable: true),
                      Email = table.Column<string>(nullable: true),
                      EmailConfirmed = table.Column<bool>(nullable: false),
                      LockoutEnabled = table.Column<bool>(nullable: false),
                      LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
                      NormalizedEmail = table.Column<string>(nullable: true),
                      NormalizedUserName = table.Column<string>(nullable: true),
                      PasswordHash = table.Column<string>(nullable: true),
                      PhoneNumber = table.Column<string>(nullable: true),
                      PhoneNumberConfirmed = table.Column<bool>(nullable: false),
                      SecurityStamp = table.Column<string>(nullable: true),
                      TwoFactorEnabled = table.Column<bool>(nullable: false),
                      UserName = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_ApplicationUser", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Baner",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Hyperlink = table.Column<string>(nullable: true),
                      ImageUrl = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true),
                      Text = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Baner", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Business",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Business", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Category",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Icon = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Category", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Collection",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      CollectionType = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Collection", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "CollectionType",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_CollectionType", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "FileType",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Extension = table.Column<string>(nullable: true),
                      Icon = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_FileType", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Icon",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Icon", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Page",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Page", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Portfolio",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Portfolio", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Section",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Section", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Setting",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      IsMandatory = table.Column<bool>(nullable: false),
                      Name = table.Column<string>(nullable: true),
                      Value = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Setting", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "SimplePanel",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Hyperlink = table.Column<string>(nullable: true),
                      Name = table.Column<string>(nullable: true),
                      Text = table.Column<string>(nullable: true),
                      Title = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_SimplePanel", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "SimpleText",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true),
                      Text = table.Column<string>(nullable: true),
                      Title = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_SimpleText", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Slider",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Slider", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "Tag",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      Name = table.Column<string>(nullable: true)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_Tag", x => x.Id);
                  });
              migrationBuilder.CreateTable(
                  name: "AspNetRoleClaims",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      ClaimType = table.Column<string>(nullable: true),
                      ClaimValue = table.Column<string>(nullable: true),
                      RoleId = table.Column<string>(nullable: false)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_IdentityRoleClaim<string>", x => x.Id);
                      table.ForeignKey(
                          name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
                          column: x => x.RoleId,
                          principalTable: "AspNetRoles",
                          principalColumn: "Id",
                          onDelete: ReferentialAction.Cascade);
                  });
              migrationBuilder.CreateTable(
                  name: "AspNetUserClaims",
                  columns: table => new
                  {
                      Id = table.Column<int>(nullable: false)
                          .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                      ClaimType = table.Column<string>(nullable: true),
                      ClaimValue = table.Column<string>(nullable: true),
                      UserId = table.Column<string>(nullable: false)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_IdentityUserClaim<string>", x => x.Id);
                      table.ForeignKey(
                          name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
                          column: x => x.UserId,
                          principalTable: "AspNetUsers",
                          principalColumn: "Id",
                          onDelete: ReferentialAction.Cascade);
                  });
              migrationBuilder.CreateTable(
                  name: "AspNetUserLogins",
                  columns: table => new
                  {
                      LoginProvider = table.Column<string>(nullable: false),
                      ProviderKey = table.Column<string>(nullable: false),
                      ProviderDisplayName = table.Column<string>(nullable: true),
                      UserId = table.Column<string>(nullable: false)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_IdentityUserLogin<string>", x => new { x.LoginProvider, x.ProviderKey });
                      table.ForeignKey(
                          name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
                          column: x => x.UserId,
                          principalTable: "AspNetUsers",
                          principalColumn: "Id",
                          onDelete: ReferentialAction.Cascade);
                  });
              migrationBuilder.CreateTable(
                  name: "AspNetUserRoles",
                  columns: table => new
                  {
                      UserId = table.Column<string>(nullable: false),
                      RoleId = table.Column<string>(nullable: false)
                  },
                  constraints: table =>
                  {
                      table.PrimaryKey("PK_IdentityUserRole<string>", x => new { x.UserId, x.RoleId });
                      table.ForeignKey(
                          name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
  
gt:                         column: x => x.RoleId,