From 3042257f0fd893329dcab62e03742ab06baff372 Mon Sep 17 00:00:00 2001 From: Cyril L'Orphelin <cyril.lorphelin@cc.in2p3.fr> Date: Mon, 10 Feb 2020 14:50:39 +0100 Subject: [PATCH] MAJ DOckerfile --- Dockerfile | 2 +- tms/src/Entity/Librairie.php | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82348fe5..d1545088 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ RUN adduser nginx RUN addgroup nginx root RUN mkdir /var/cache/nginx RUN mkdir -p /var/lib/nginx/fastcgi -RUN chmod -r 777 /var/cache/nginx /var/log/nginx /var/lib/nginx +RUN chmod 777 -r /var/cache/nginx /var/log/nginx /var/lib/nginx USER nginx # support running as arbitrary user which belongs to the root group diff --git a/tms/src/Entity/Librairie.php b/tms/src/Entity/Librairie.php index 87726329..c30b2b26 100644 --- a/tms/src/Entity/Librairie.php +++ b/tms/src/Entity/Librairie.php @@ -3,7 +3,6 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -use Doctrine\ORM\EntityRepository; /** * Librairie @@ -53,14 +52,14 @@ class Librairie /** * @var \DateTime * - * @ORM\Column(name="DateCreation", type="datetime", nullable=false) + * @ORM\Column(name="DateCreation", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"}) */ - private $datecreation; + private $datecreation = 'CURRENT_TIMESTAMP'; /** - * @var \DateTime + * @var \DateTime|null * - * @ORM\Column(name="DateSuppression", type="datetime", nullable=false) + * @ORM\Column(name="DateSuppression", type="datetime", nullable=true) */ private $datesuppression; @@ -134,7 +133,7 @@ class Librairie return $this->datesuppression; } - public function setDatesuppression(\DateTimeInterface $datesuppression): self + public function setDatesuppression(?\DateTimeInterface $datesuppression): self { $this->datesuppression = $datesuppression; -- GitLab