remove unique index of TenantId and Name from Site table as site name does not need to be unique. Remove TenantId column from Site table as it is not necessary and should be obtained from the Alias.
This commit is contained in:
@@ -16,11 +16,6 @@ namespace Oqtane.Models
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Tenant"/> the Site is in
|
||||
/// </summary>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The site Name
|
||||
/// </summary>
|
||||
@@ -203,12 +198,17 @@ namespace Oqtane.Models
|
||||
[NotMapped]
|
||||
public string Fingerprint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Tenant"/> the Site belongs to
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
public Site Clone()
|
||||
{
|
||||
return new Site
|
||||
{
|
||||
SiteId = SiteId,
|
||||
TenantId = TenantId,
|
||||
Name = Name,
|
||||
TimeZoneId = TimeZoneId,
|
||||
LogoFileId = LogoFileId,
|
||||
@@ -246,7 +246,8 @@ namespace Oqtane.Models
|
||||
Pages = Pages.ConvertAll(page => page.Clone()),
|
||||
Languages = Languages.ConvertAll(language => language.Clone()),
|
||||
Themes = Themes,
|
||||
Fingerprint = Fingerprint
|
||||
Fingerprint = Fingerprint,
|
||||
TenantId = TenantId
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user