From f687178238a9a24e13b98fa5963c9152e5c083d5 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Mon, 1 Jun 2026 15:59:08 +0330 Subject: [PATCH] fix(migration): add [Migration] attribute so EF discovers AddCafeLocation Manual migration was missing the [Migration("...")] and [DbContext] attributes that EF Core requires to discover and apply migrations via MigrateAsync(). Without them the Latitude/Longitude columns were never added to Cafes, causing every query involving the Cafe entity to throw 42703 column-not-found errors. Columns must be applied manually on the server before the next deploy: ALTER TABLE "Cafes" ADD COLUMN IF NOT EXISTS "Latitude" double precision, ... Co-Authored-By: Claude Sonnet 4.6 --- .../Data/Migrations/20260601120000_AddCafeLocation.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Meezi.Infrastructure/Data/Migrations/20260601120000_AddCafeLocation.cs b/src/Meezi.Infrastructure/Data/Migrations/20260601120000_AddCafeLocation.cs index 1545928..a7917f7 100644 --- a/src/Meezi.Infrastructure/Data/Migrations/20260601120000_AddCafeLocation.cs +++ b/src/Meezi.Infrastructure/Data/Migrations/20260601120000_AddCafeLocation.cs @@ -1,10 +1,14 @@ +using Meezi.Infrastructure.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Meezi.Infrastructure.Data.Migrations { - /// + [DbContext(typeof(AppDbContext))] + [Migration("20260601120000_AddCafeLocation")] public partial class AddCafeLocation : Migration { ///