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");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user