API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20190910092816_GeorgeNew.cs 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
  4. namespace UnivateProperties_API.Migrations
  5. {
  6. public partial class GeorgeNew : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.DropColumn(
  11. name: "CreatedBy",
  12. table: "Properties");
  13. migrationBuilder.AddColumn<int>(
  14. name: "GCRecord",
  15. table: "Properties",
  16. nullable: true);
  17. migrationBuilder.CreateTable(
  18. name: "SearchLogs",
  19. columns: table => new
  20. {
  21. Id = table.Column<int>(nullable: false)
  22. .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
  23. Created = table.Column<DateTime>(nullable: false),
  24. Modified = table.Column<DateTime>(nullable: false),
  25. ModifiedBy = table.Column<string>(nullable: true),
  26. UserID = table.Column<int>(nullable: true),
  27. Search = table.Column<string>(nullable: true)
  28. },
  29. constraints: table =>
  30. {
  31. table.PrimaryKey("PK_SearchLogs", x => x.Id);
  32. });
  33. }
  34. protected override void Down(MigrationBuilder migrationBuilder)
  35. {
  36. migrationBuilder.DropTable(
  37. name: "SearchLogs");
  38. migrationBuilder.DropColumn(
  39. name: "GCRecord",
  40. table: "Properties");
  41. migrationBuilder.AddColumn<string>(
  42. name: "CreatedBy",
  43. table: "Properties",
  44. nullable: true);
  45. }
  46. }
  47. }