Add migration for a new cancelled_at column for scheduled tasks

[MAILPOET-5755]
This commit is contained in:
 Ján Mikláš
2024-06-17 14:50:41 +02:00
committed by Ján Mikláš
parent e55a861137
commit 1918d30fcd
2 changed files with 42 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
class ScheduledTaskEntity {
const STATUS_COMPLETED = 'completed';
const STATUS_SCHEDULED = 'scheduled';
const STATUS_CANCELLED = 'cancelled';
const STATUS_PAUSED = 'paused';
const STATUS_INVALID = 'invalid';
const VIRTUAL_STATUS_RUNNING = 'running'; // For historical reasons this is stored as null in DB
@@ -59,6 +60,12 @@ class ScheduledTaskEntity {
*/
private $scheduledAt;
/**
* @ORM\Column(type="datetimetz", nullable=true)
* @var DateTimeInterface|null
*/
private $cancelledAt;
/**
* @ORM\Column(type="datetimetz", nullable=true)
* @var DateTimeInterface|null
@@ -155,6 +162,20 @@ class ScheduledTaskEntity {
$this->scheduledAt = $scheduledAt;
}
/**
* @return DateTimeInterface|null
*/
public function getCancelledAt() {
return $this->cancelledAt;
}
/**
* @param DateTimeInterface|null $cancelledAt
*/
public function setCancelledAt($cancelledAt) {
$this->cancelledAt = $cancelledAt;
}
/**
* @return DateTimeInterface|null
*/