mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FIX [migration][absence] fix the typing in db for absence datetime immuatable
This commit is contained in:
parent
b2924ede70
commit
b93b78615b
@ -42,7 +42,7 @@ class User implements AdvancedUserInterface
|
|||||||
protected ?int $id = null;
|
protected ?int $id = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="datetime", nullable=true)
|
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||||
*/
|
*/
|
||||||
private ?DateTimeImmutable $absenceStart = null;
|
private ?DateTimeImmutable $absenceStart = null;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ class AbsenceType extends AbstractType
|
|||||||
$builder
|
$builder
|
||||||
->add('absenceStart', ChillDateTimeType::class, [
|
->add('absenceStart', ChillDateTimeType::class, [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'input' => 'datetime_immutable',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ final class Version20230111160610 extends AbstractMigration
|
|||||||
public function down(Schema $schema): void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('ALTER TABLE users DROP absenceStart');
|
$this->addSql('ALTER TABLE users DROP absenceStart');
|
||||||
|
$this->addSql('COMMENT ON COLUMN users.absenceStart IS \'(DC2Type:datetime_immutable)\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user