mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-28 12:19:01 +00:00
Make PhotoSubjects use a one to many relationship (#687)
* Attempt to remodel PhotoSubject and Photo relationship
* Fix migration name
* Use exactName for migration lock
* Revert "Use exactName for migration lock"
This reverts commit 76cee6a3ff
.
* Set command timeout to 5 minutes for database migrations
* Delete unused PhotoSubjects in migration
* Clean up website queries and finalize subject refactor
* Add migration to remove PhotoSubjectCollection
* Add grace period for container startup and optimize startup
* Make config backup copy original file
* Allow docker entrypoint to fix data permissions
This commit is contained in:
parent
35ea2682b9
commit
017dcd6888
22 changed files with 240 additions and 210 deletions
|
@ -76,21 +76,21 @@
|
|||
</i>
|
||||
</p>
|
||||
|
||||
@if (Model.Subjects.Count > 0)
|
||||
@if (Model.PhotoSubjects.Count > 0)
|
||||
{
|
||||
<p>
|
||||
<b>Photo contains @Model.Subjects.Count @(Model.Subjects.Count == 1 ? "person" : "people"):</b>
|
||||
<b>Photo contains @Model.PhotoSubjects.Count @(Model.PhotoSubjects.Count == 1 ? "person" : "people"):</b>
|
||||
</p>
|
||||
}
|
||||
<div id="hover-subjects-@Model.PhotoId">
|
||||
@foreach (PhotoSubject subject in Model.Subjects)
|
||||
@foreach (PhotoSubject subject in Model.PhotoSubjects)
|
||||
{
|
||||
@await subject.User.ToLink(Html, ViewData, language, timeZone)
|
||||
}
|
||||
</div>
|
||||
|
||||
@{
|
||||
PhotoSubject[] subjects = Model.Subjects.ToArray();
|
||||
PhotoSubject[] subjects = Model.PhotoSubjects.ToArray();
|
||||
foreach (PhotoSubject subject in subjects) subject.Username = subject.User.Username;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue