Repository: no last_check at creation

This commit is contained in:
nemunaire 2022-09-04 23:45:48 +02:00
parent 931d02854a
commit 3285d5e896
2 changed files with 2 additions and 2 deletions

2
db.go
View File

@ -234,7 +234,7 @@ CREATE TABLE IF NOT EXISTS user_work_repositories(
id_user INTEGER NOT NULL, id_user INTEGER NOT NULL,
id_work INTEGER NOT NULL, id_work INTEGER NOT NULL,
uri VARCHAR(255) NOT NULL, uri VARCHAR(255) NOT NULL,
last_check TIMESTAMP, last_check TIMESTAMP NULL DEFAULT NULL,
FOREIGN KEY(id_user) REFERENCES users(id_user), FOREIGN KEY(id_user) REFERENCES users(id_user),
FOREIGN KEY(id_work) REFERENCES works(id_work), FOREIGN KEY(id_work) REFERENCES works(id_work),
UNIQUE one_repo_per_work (id_user, id_work) UNIQUE one_repo_per_work (id_user, id_work)

View File

@ -51,7 +51,7 @@
<div class="d-flex flex-column justify-content-center"> <div class="d-flex flex-column justify-content-center">
<div> <div>
Dépôt lié&nbsp;: <strong style="font-family: monospace">{repo.uri}</strong><br> Dépôt lié&nbsp;: <strong style="font-family: monospace">{repo.uri}</strong><br>
Dernière récupération&nbsp;: <strong><DateFormat date={new Date(repo.last_check)} dateStyle="medium" timeStyle="medium" /></strong> Dernière récupération&nbsp;: <strong>{#if repo.last_check}<DateFormat date={new Date(repo.last_check)} dateStyle="medium" timeStyle="medium" />{:else}-{/if}</strong>
</div> </div>
</div> </div>
<div class="d-flex flex-column justify-content-center"> <div class="d-flex flex-column justify-content-center">