Skip to content

Commit

Permalink
BUGFIX: Create table when it not exists
Browse files Browse the repository at this point in the history
Fixes: #2
  • Loading branch information
markusguenther authored Nov 27, 2023
1 parent f512a94 commit 611b83e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Migrations/Mysql/Version20210419144652.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 611b83e

Please sign in to comment.