115 lines
3.7 KiB
C#
115 lines
3.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace gehGassi.Persistence.Migrations
|
|
{
|
|
public partial class RatingStatisticsBaseAdded : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatistics_AverageRating",
|
|
table: "Dogs",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatistics_TotalPoints",
|
|
table: "Dogs",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "RatingStatistics_TotalRatings",
|
|
table: "Dogs",
|
|
type: "int",
|
|
nullable: true,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatisticsWalker_AverageRating",
|
|
table: "AppUsers",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatisticsWalker_TotalPoints",
|
|
table: "AppUsers",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "RatingStatisticsWalker_TotalRatings",
|
|
table: "AppUsers",
|
|
type: "int",
|
|
nullable: true,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatistics_AverageRating",
|
|
table: "AppUsers",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RatingStatistics_TotalPoints",
|
|
table: "AppUsers",
|
|
type: "decimal(18,2)",
|
|
nullable: true,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "RatingStatistics_TotalRatings",
|
|
table: "AppUsers",
|
|
type: "int",
|
|
nullable: true,
|
|
defaultValue: 0);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_AverageRating",
|
|
table: "Dogs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_TotalPoints",
|
|
table: "Dogs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_TotalRatings",
|
|
table: "Dogs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatisticsWalker_AverageRating",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatisticsWalker_TotalPoints",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatisticsWalker_TotalRatings",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_AverageRating",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_TotalPoints",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RatingStatistics_TotalRatings",
|
|
table: "AppUsers");
|
|
}
|
|
}
|
|
}
|