Skip to content

Commit f431b48

Browse files
Cwdoe 568 move title and description (#7)
* swapped situation information from evaluation to move * modify seed data * Add missing document markings * add evaluation situation endpoint * Add missing document markings Co-authored-by: sei-tspencer <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent c9d12ff commit f431b48

11 files changed

+2764
-16
lines changed

Cite.Api.Data/Models/Move.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class MoveEntity : BaseEntity
1616
public Guid Id { get; set; }
1717
public string Description { get; set; }
1818
public int MoveNumber { get; set; }
19+
public DateTime SituationTime { get; set;}
20+
public string SituationDescription { get; set; }
1921
public Guid EvaluationId { get; set; }
2022
public virtual EvaluationEntity Evaluation { get; set; }
2123
}

Cite.Api.Migrations.PostgreSQL/Migrations/FiteContextModelSnapshot.cs renamed to Cite.Api.Migrations.PostgreSQL/Migrations/20221202193317_moveSituationTimeAndDescription.Designer.cs

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright 2022 Carnegie Mellon University. All Rights Reserved.
3+
Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
4+
*/
5+
6+
using System;
7+
using Microsoft.EntityFrameworkCore.Migrations;
8+
9+
#nullable disable
10+
11+
namespace Cite.Api.Migrations.PostgreSQL.Migrations
12+
{
13+
public partial class moveSituationTimeAndDescription : Migration
14+
{
15+
protected override void Up(MigrationBuilder migrationBuilder)
16+
{
17+
migrationBuilder.DropColumn(
18+
name: "situation_description",
19+
table: "evaluations");
20+
21+
migrationBuilder.DropColumn(
22+
name: "situation_time",
23+
table: "evaluations");
24+
25+
migrationBuilder.AddColumn<string>(
26+
name: "situation_description",
27+
table: "moves",
28+
type: "text",
29+
nullable: true);
30+
31+
migrationBuilder.AddColumn<DateTime>(
32+
name: "situation_time",
33+
table: "moves",
34+
type: "timestamp with time zone",
35+
nullable: false,
36+
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
37+
}
38+
39+
protected override void Down(MigrationBuilder migrationBuilder)
40+
{
41+
migrationBuilder.DropColumn(
42+
name: "situation_description",
43+
table: "moves");
44+
45+
migrationBuilder.DropColumn(
46+
name: "situation_time",
47+
table: "moves");
48+
49+
migrationBuilder.AddColumn<string>(
50+
name: "situation_description",
51+
table: "evaluations",
52+
type: "text",
53+
nullable: true);
54+
55+
migrationBuilder.AddColumn<DateTime>(
56+
name: "situation_time",
57+
table: "evaluations",
58+
type: "timestamp with time zone",
59+
nullable: false,
60+
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)