From 611b83eab77bee42b38a3f286547200e4b85e677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20G=C3=BCnther?= Date: Mon, 27 Nov 2023 14:04:40 +0100 Subject: [PATCH] BUGFIX: Create table when it not exists Fixes: #2 --- Migrations/Mysql/Version20210419144652.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Migrations/Mysql/Version20210419144652.php b/Migrations/Mysql/Version20210419144652.php index 45f6eab..97259d1 100644 --- a/Migrations/Mysql/Version20210419144652.php +++ b/Migrations/Mysql/Version20210419144652.php @@ -18,7 +18,7 @@ public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); - $this->addSql('CREATE TABLE flowpack_entityusage_databasestorage_domain_model_entityusage (persistence_object_identifier VARCHAR(40) NOT NULL, usageid VARCHAR(255) NOT NULL, entityid VARCHAR(255) NOT NULL, serviceid VARCHAR(255) NOT NULL, metadata LONGTEXT NOT NULL COMMENT \'(DC2Type:flow_json_array)\', INDEX entityserviceid (usageid, entityid, serviceid), INDEX serviceindex (serviceid), INDEX usageindex (usageid), INDEX entityindex (entityid), PRIMARY KEY(persistence_object_identifier)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE IF NOT EXISTS flowpack_entityusage_databasestorage_domain_model_entityusage (persistence_object_identifier VARCHAR(40) NOT NULL, usageid VARCHAR(255) NOT NULL, entityid VARCHAR(255) NOT NULL, serviceid VARCHAR(255) NOT NULL, metadata LONGTEXT NOT NULL COMMENT \'(DC2Type:flow_json_array)\', INDEX entityserviceid (usageid, entityid, serviceid), INDEX serviceindex (serviceid), INDEX usageindex (usageid), INDEX entityindex (entityid), PRIMARY KEY(persistence_object_identifier)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); } public function down(Schema $schema) : void