Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MessageIndex columns #32

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/DispenserProvider.DataBase/Models/BuilderDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class BuilderDTO
[Column(TypeName = "datetime2(0)")]
public DateTime? FinishTime { get; set; }

public int MessageIndex { get; set; }

public long TransactionDetailId { get; set; }
public virtual TransactionDetailDTO TransactionDetail { get; set; } = null!;
}
2 changes: 0 additions & 2 deletions src/DispenserProvider.DataBase/Models/DispenserDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public class DispenserDTO
[Column(TypeName = "datetime2(0)")]
public DateTime RefundFinishTime { get; set; }

public int MessageIndex { get; set; }

[Column(TypeName = "nvarchar(132)")]
public string? Signature { get; set; }
public virtual SignatureDTO? UserSignature { get; set; } = null!;
Expand Down

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,40 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DispenserProvider.DataBase.Migrations
{
/// <inheritdoc />
public partial class RemoveMessageIndexColumns : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MessageIndex",
table: "Dispenser");

migrationBuilder.DropColumn(
name: "MessageIndex",
table: "Builders");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "MessageIndex",
table: "Dispenser",
type: "int",
nullable: false,
defaultValue: 0);

migrationBuilder.AddColumn<int>(
name: "MessageIndex",
table: "Builders",
type: "int",
nullable: false,
defaultValue: 0);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<DateTime?>("FinishTime")
.HasColumnType("datetime2(0)");

b.Property<int>("MessageIndex")
.HasColumnType("int");

b.Property<string>("ProviderAddress")
.IsRequired()
.HasColumnType("nvarchar(42)");
Expand Down Expand Up @@ -68,9 +65,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("DeletionLogSignature")
.HasColumnType("nvarchar(132)");

b.Property<int>("MessageIndex")
.HasColumnType("int");

b.Property<long?>("RefundDetailId")
.HasColumnType("bigint");

Expand Down
Loading