20250117153800_UpdateFields.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace bitforum.Migrations.DefaultDb
  4. {
  5. /// <inheritdoc />
  6. public partial class UpdateFields : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.RenameColumn(
  12. name: "IsDisplay",
  13. table: "Document",
  14. newName: "IsActive");
  15. migrationBuilder.CreateIndex(
  16. name: "IX_Document_IsActive",
  17. table: "Document",
  18. column: "IsActive",
  19. unique: true);
  20. }
  21. /// <inheritdoc />
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.DropIndex(
  25. name: "IX_Document_IsActive",
  26. table: "Document");
  27. migrationBuilder.RenameColumn(
  28. name: "IsActive",
  29. table: "Document",
  30. newName: "IsDisplay");
  31. }
  32. }
  33. }