45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
| using Microsoft.EntityFrameworkCore.Migrations;
 | |
| 
 | |
| #nullable disable
 | |
| 
 | |
| namespace NetinaShop.Repository.Migrations
 | |
| {
 | |
|     /// <inheritdoc />
 | |
|     public partial class EditOrderAddProductDiscount : Migration
 | |
|     {
 | |
|         /// <inheritdoc />
 | |
|         protected override void Up(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             migrationBuilder.AddColumn<double>(
 | |
|                 name: "DiscountCodePrice",
 | |
|                 schema: "public",
 | |
|                 table: "Orders",
 | |
|                 type: "double precision",
 | |
|                 nullable: false,
 | |
|                 defaultValue: 0.0);
 | |
| 
 | |
|             migrationBuilder.AddColumn<double>(
 | |
|                 name: "ProductDiscountPrice",
 | |
|                 schema: "public",
 | |
|                 table: "Orders",
 | |
|                 type: "double precision",
 | |
|                 nullable: false,
 | |
|                 defaultValue: 0.0);
 | |
|         }
 | |
| 
 | |
|         /// <inheritdoc />
 | |
|         protected override void Down(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             migrationBuilder.DropColumn(
 | |
|                 name: "DiscountCodePrice",
 | |
|                 schema: "public",
 | |
|                 table: "Orders");
 | |
| 
 | |
|             migrationBuilder.DropColumn(
 | |
|                 name: "ProductDiscountPrice",
 | |
|                 schema: "public",
 | |
|                 table: "Orders");
 | |
|         }
 | |
|     }
 | |
| }
 |