Fix: rename Data/ to Database/ to avoid gitignore collision
deploy / deploy (push) Failing after 13s
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:
@@ -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
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using SoroushAsadi.Data;
|
using SoroushAsadi.Database;
|
||||||
using SoroushAsadi.Services;
|
using SoroushAsadi.Services;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using SoroushAsadi.Data;
|
using SoroushAsadi.Database;
|
||||||
|
|
||||||
namespace SoroushAsadi.Services;
|
namespace SoroushAsadi.Services;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user