diff options
| author | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-10-22 15:54:54 +0200 |
|---|---|---|
| committer | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-10-22 15:54:54 +0200 |
| commit | 3f3bb3cefc4c886b42a178e38512ae8949b4926e (patch) | |
| tree | f237e23b5da0af47ea69a7f2e9bc28f90def91da /backend | |
| parent | 135e9934e12ffc76f4548d5d1f8ee282515a2a9b (diff) | |
Fix icon storage in suggestion
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/Elements.Data/Migrations/20231022135245_Initial.Designer.cs (renamed from backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs) | 6 | ||||
| -rw-r--r-- | backend/Elements.Data/Migrations/20231022135245_Initial.cs (renamed from backend/Elements.Data/Migrations/20231022092319_Initial.cs) | 2 | ||||
| -rw-r--r-- | backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs | 4 | ||||
| -rw-r--r-- | backend/Elements.Data/Models/Suggestion.cs | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs b/backend/Elements.Data/Migrations/20231022135245_Initial.Designer.cs index 41c4295..cb525bd 100644 --- a/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs +++ b/backend/Elements.Data/Migrations/20231022135245_Initial.Designer.cs @@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Elements.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20231022092319_Initial")] + [Migration("20231022135245_Initial")] partial class Initial { /// <inheritdoc /> @@ -116,9 +116,9 @@ namespace Elements.Data.Migrations b.Property<int>("FirstIngredientId") .HasColumnType("INTEGER"); - b.Property<string>("Icon") + b.Property<byte[]>("Icon") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("BLOB"); b.Property<string>("Name") .IsRequired() diff --git a/backend/Elements.Data/Migrations/20231022092319_Initial.cs b/backend/Elements.Data/Migrations/20231022135245_Initial.cs index 313f86f..1b203db 100644 --- a/backend/Elements.Data/Migrations/20231022092319_Initial.cs +++ b/backend/Elements.Data/Migrations/20231022135245_Initial.cs @@ -89,7 +89,7 @@ namespace Elements.Data.Migrations Id = table.Column<int>(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Name = table.Column<string>(type: "TEXT", nullable: false), - Icon = table.Column<string>(type: "TEXT", nullable: false), + Icon = table.Column<byte[]>(type: "BLOB", nullable: false), FirstIngredientId = table.Column<int>(type: "INTEGER", nullable: false), SecondIngredientId = table.Column<int>(type: "INTEGER", nullable: false), VotingEnd = table.Column<DateTime>(type: "TEXT", nullable: false), diff --git a/backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs b/backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs index 32bb909..095839f 100644 --- a/backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/backend/Elements.Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -113,9 +113,9 @@ namespace Elements.Data.Migrations b.Property<int>("FirstIngredientId") .HasColumnType("INTEGER"); - b.Property<string>("Icon") + b.Property<byte[]>("Icon") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("BLOB"); b.Property<string>("Name") .IsRequired() diff --git a/backend/Elements.Data/Models/Suggestion.cs b/backend/Elements.Data/Models/Suggestion.cs index ac442ec..3d626fc 100644 --- a/backend/Elements.Data/Models/Suggestion.cs +++ b/backend/Elements.Data/Models/Suggestion.cs @@ -4,7 +4,7 @@ public class Suggestion { public int Id { get; set; } public required string Name { get; init; } - public required string Icon { get; init; } + public required byte[] Icon { get; init; } public required Element FirstIngredient { get; init; } public required Element SecondIngredient { get; init; } public required DateTime VotingEnd { get; init; } |
