Skip to content

Commit

Permalink
add sortie record version
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Dec 20, 2023
1 parent 98c519e commit 1eae53d
Show file tree
Hide file tree
Showing 6 changed files with 392 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ElectronicObserver.Database.Migrations
{
/// <inheritdoc />
public partial class AddSortieRecordVersion : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "Version",
table: "Sorties",
type: "INTEGER",
nullable: false,
defaultValue: 0);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Version",
table: "Sorties");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.IsRequired()
.HasColumnType("TEXT");

b.Property<int>("Version")
.HasColumnType("INTEGER");

b.Property<int>("World")
.HasColumnType("INTEGER");

Expand Down
1 change: 1 addition & 0 deletions ElectronicObserver/Database/Sortie/SortieRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace ElectronicObserver.Database.Sortie;

public class SortieRecord
{
public required int Version { get; set; }
public int Id { get; set; }
public int World { get; set; }
public int Map { get; set; }
Expand Down
Loading

0 comments on commit 1eae53d

Please sign in to comment.