12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using Microsoft.EntityFrameworkCore.Migrations;
-
- namespace Karsha_Site.Persistance.Migrations
- {
- public partial class Products : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.RenameColumn(
- name: "Brand",
- table: "Products",
- newName: "Code");
-
- migrationBuilder.AlterColumn<long>(
- name: "Price",
- table: "Products",
- type: "bigint",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int");
-
- migrationBuilder.AddColumn<bool>(
- name: "IsMain",
- table: "ProductImages",
- type: "bit",
- nullable: false,
- defaultValue: false);
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "IsMain",
- table: "ProductImages");
-
- migrationBuilder.RenameColumn(
- name: "Code",
- table: "Products",
- newName: "Brand");
-
- migrationBuilder.AlterColumn<int>(
- name: "Price",
- table: "Products",
- type: "int",
- nullable: false,
- defaultValue: 0,
- oldClrType: typeof(long),
- oldType: "bigint",
- oldNullable: true);
- }
- }
- }
|