Olivier Massot 9 месяцев назад
Родитель
Сommit
f44efe22e1

+ 1 - 1
src/Entity/Core/BankAccount.php

@@ -54,7 +54,7 @@ class BankAccount
     /**
      * 0 => jamais facturé, 1 => facturé 1 fois, 2 => facturé plusieurs fois.
      */
-    #[ORM\Column(type: "tinyint", options: ['default' => 0])]
+    #[ORM\Column(columnDefinition: "TINYINT DEFAULT 0 NOT NULL")]
     private ?int $countInvoiced = 0;
 
     #[ORM\Column(length: 255, nullable: true)]

+ 1 - 1
src/Entity/Education/EducationNotationConfig.php

@@ -47,7 +47,7 @@ class EducationNotationConfig
     #[ORM\Column(type: 'text', nullable: true)]
     private ?string $description;
 
-    #[ORM\Column(type: "integer", options: ['default' => 1])]
+    #[ORM\Column(columnDefinition: "TINYINT DEFAULT 1 NOT NULL")]
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 1, max: 10)]
     private int $coefficient = 1;
 

+ 2 - 2
src/Entity/Organization/Parameters.php

@@ -62,7 +62,7 @@ class Parameters
     #[ORM\Column(type: 'date', nullable: true)]
     private ?\DateTimeInterface $endCourseDate = null;
 
-    #[ORM\Column(type: "tinyint", options: ['default' => 20])]
+    #[ORM\Column(columnDefinition: "TINYINT DEFAULT 20 NOT NULL")]
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 0, max: 100)]
     private int $average = 20;
 
@@ -182,7 +182,7 @@ class Parameters
     #[ORM\Column(type: 'boolean', options: ['default' => false])]
     private bool $notifyAdministrationAbsence = false;
 
-    #[ORM\Column(type: "tinyint", options: ['default' => 2])]
+    #[ORM\Column(columnDefinition: "TINYINT DEFAULT 2 NOT NULL")]
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 2, max: 100)]
     private int $numberConsecutiveAbsences = 2;