Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace Karsha_Site.Persistance.Migrations
  3. {
  4. public partial class Products : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.RenameColumn(
  9. name: "Brand",
  10. table: "Products",
  11. newName: "Code");
  12. migrationBuilder.AlterColumn<long>(
  13. name: "Price",
  14. table: "Products",
  15. type: "bigint",
  16. nullable: true,
  17. oldClrType: typeof(int),
  18. oldType: "int");
  19. migrationBuilder.AddColumn<bool>(
  20. name: "IsMain",
  21. table: "ProductImages",
  22. type: "bit",
  23. nullable: false,
  24. defaultValue: false);
  25. }
  26. protected override void Down(MigrationBuilder migrationBuilder)
  27. {
  28. migrationBuilder.DropColumn(
  29. name: "IsMain",
  30. table: "ProductImages");
  31. migrationBuilder.RenameColumn(
  32. name: "Code",
  33. table: "Products",
  34. newName: "Brand");
  35. migrationBuilder.AlterColumn<int>(
  36. name: "Price",
  37. table: "Products",
  38. type: "int",
  39. nullable: false,
  40. defaultValue: 0,
  41. oldClrType: typeof(long),
  42. oldType: "bigint",
  43. oldNullable: true);
  44. }
  45. }
  46. }