Skip to content

Commit

Permalink
Merge pull request #6 from rkrahnen/index_state_scheduled
Browse files Browse the repository at this point in the history
TASK: Add index on state and scheduled
  • Loading branch information
daniellienert authored May 29, 2019
2 parents a7bf8ef + 1330977 commit 6ee9bf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Queue/DoctrineQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function setUp(): void
$createDatabaseStatement = "CREATE TABLE IF NOT EXISTS {$this->connection->quoteIdentifier($this->tableName)} (id INTEGER PRIMARY KEY AUTO_INCREMENT, payload LONGTEXT NOT NULL, state VARCHAR(255) NOT NULL, failures INTEGER NOT NULL DEFAULT 0, scheduled DATETIME DEFAULT NULL) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB";
}
$this->connection->exec($createDatabaseStatement);
$this->connection->exec("CREATE INDEX state_scheduled ON {$this->connection->quoteIdentifier($this->tableName)} (state, scheduled)");
}

/**
Expand Down

0 comments on commit 6ee9bf1

Please sign in to comment.