Skip to content

✨ Add Tenant Entity and Migrations #1505

@zacharykeeping

Description

@zacharykeeping

Hi Developers,

Pain

We need a database table to store tenant metadata and settings. This provides a persistent store for tenant information beyond configuration files.

Suggested Solution

Create a Tenant entity with all required settings fields. Generate EF Core migration and seed default SSW tenant data.

Implementation:

  • Create Tenant entity class
  • Create BaseTenantEntity base class
  • Configure in ApplicationDbContext
  • Generate migration
  • Add seed data

Tasks

  • Create Domain/Entities/Tenant.cs
  • Create Domain/Common/BaseTenantEntity.cs
  • Configure entity in ApplicationDbContext
  • Generate EF migration
  • Create seed data migrator
  • Test migration on clean database
  • Add unique constraints on tenant identifiers
  • Include audit fields (CreatedDate, etc.)

Acceptance Criteria

More Information

Files to Create/Modify:

  • NEW: src/Domain/Entities/Tenant.cs
  • NEW: src/Domain/Common/BaseTenantEntity.cs
  • MODIFY: src/Infrastructure/Persistence/ApplicationDbContext.cs
  • MODIFY: src/Infrastructure/Persistence/ApplicationDbContextInitializer.cs
  • NEW: EF migration file

Epic: #1483

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions