Fix: rename Data/ to Database/ to avoid gitignore collision
deploy / deploy (push) Failing after 13s

.gitignore has '/data' which Windows git (case-insensitive) silently
matched '/Data/', so AppDbContext.cs was never committed and the Docker
build (Linux, case-sensitive) failed with CS0234 'Data' not found.
Renaming the directory to 'Database/' sidesteps the collision.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-01 08:00:54 +03:30
parent 1b3a8b493e
commit f2d6300d72
3 changed files with 23 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using SoroushAsadi.Models;
namespace SoroushAsadi.Database;
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
public DbSet<ContentSection> ContentSections => Set<ContentSection>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<ContentSection>(e =>
{
e.ToTable("sections");
e.HasKey(x => x.Key);
e.Property(x => x.Key).HasColumnName("key");
e.Property(x => x.DataJson).HasColumnName("data");
e.Property(x => x.UpdatedAt).HasColumnName("updated_at");
});
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.EntityFrameworkCore;
using SoroushAsadi.Data;
using SoroushAsadi.Database;
using SoroushAsadi.Services;
var builder = WebApplication.CreateBuilder(args);
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Text.Json;
using System.Text.Json.Nodes;
using SoroushAsadi.Data;
using SoroushAsadi.Database;
namespace SoroushAsadi.Services;