From 1ebdcd1530546ce990fdea322a836fcc8cdf3aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 12 Dec 2022 21:15:32 +0100 Subject: [PATCH] Feature: create table for CronJobExecution --- .../migrations/Version20221212163734.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/Bundle/ChillMainBundle/migrations/Version20221212163734.php diff --git a/src/Bundle/ChillMainBundle/migrations/Version20221212163734.php b/src/Bundle/ChillMainBundle/migrations/Version20221212163734.php new file mode 100644 index 000000000..3ec61d38f --- /dev/null +++ b/src/Bundle/ChillMainBundle/migrations/Version20221212163734.php @@ -0,0 +1,36 @@ +addSql('DROP TABLE chill_main_cronjob_execution'); + } + + public function getDescription(): string + { + return 'Table for executed jobs'; + } + + public function up(Schema $schema): void + { + $this->addSql('CREATE TABLE chill_main_cronjob_execution (key TEXT NOT NULL, lastEnd TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, + lastStart TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, lastStatus INTEGER DEFAULT NULL, PRIMARY KEY(key))'); + $this->addSql('COMMENT ON COLUMN chill_main_cronjob_execution.lastEnd IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_main_cronjob_execution.lastStart IS \'(DC2Type:datetime_immutable)\''); + } +}