Фикс миграции

This commit is contained in:
Степанов Дмитрий 2023-11-16 12:05:52 +05:00
parent 62ef6c5258
commit b5985b0fd8

View File

@ -10,6 +10,8 @@ namespace AsbCloudDb.Migrations
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.Sql("Truncate table t_daily_report");
migrationBuilder.DropPrimaryKey( migrationBuilder.DropPrimaryKey(
name: "t_id_well_date_start_pk", name: "t_id_well_date_start_pk",
table: "t_daily_report"); table: "t_daily_report");
@ -80,6 +82,8 @@ namespace AsbCloudDb.Migrations
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.Sql("Truncate table t_daily_report");
migrationBuilder.DropPrimaryKey( migrationBuilder.DropPrimaryKey(
name: "PK_t_daily_report", name: "PK_t_daily_report",
table: "t_daily_report"); table: "t_daily_report");
@ -124,8 +128,7 @@ namespace AsbCloudDb.Migrations
name: "info", name: "info",
table: "t_daily_report", table: "t_daily_report",
type: "jsonb", type: "jsonb",
nullable: false, nullable: true,
defaultValue: "",
comment: "Список параметров для отчёта"); comment: "Список параметров для отчёта");
migrationBuilder.AddPrimaryKey( migrationBuilder.AddPrimaryKey(