1
0

20230727190902_AdminLogCompoundKey.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
  3. #nullable disable
  4. namespace Content.Server.Database.Migrations.Postgres
  5. {
  6. /// <inheritdoc />
  7. public partial class AdminLogCompoundKey : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.AlterColumn<int>(
  13. name: "admin_log_id",
  14. table: "admin_log",
  15. type: "integer",
  16. nullable: false,
  17. oldClrType: typeof(int),
  18. oldType: "integer")
  19. .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
  20. }
  21. /// <inheritdoc />
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.AlterColumn<int>(
  25. name: "admin_log_id",
  26. table: "admin_log",
  27. type: "integer",
  28. nullable: false,
  29. oldClrType: typeof(int),
  30. oldType: "integer")
  31. .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
  32. }
  33. }
  34. }