diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index cf3fb8a9f..b3feb40dd 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -40,7 +40,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct private ?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation = null; /** - * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null}) * @Serializer\Groups({"read"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ @@ -111,7 +111,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct private ?string $title = ''; /** - * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null}) * @Serializer\Groups({"read"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20220427150431.php b/src/Bundle/ChillPersonBundle/migrations/Version20220427150431.php new file mode 100644 index 000000000..15defc95f --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20220427150431.php @@ -0,0 +1,41 @@ +addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER createdat TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER createdat DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER updatedat TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER updatedat DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.createdAt IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.updatedAt IS \'(DC2Type:datetime_immutable)\''); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER createdAt TYPE DATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER createdAt DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER updatedAt TYPE DATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ALTER updatedAt DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.createdat IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.updatedat IS \'(DC2Type:date_immutable)\''); + } +}