Skip to content

Commit

Permalink
Merge pull request #821 from it-at-m/feature-zms-3430-create-db-indices
Browse files Browse the repository at this point in the history
Feature zms 3430 create db indices
  • Loading branch information
MoDaae authored Feb 6, 2025
2 parents a7b3a64 + 1c913a8 commit 0098861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions zmsdb/migrations/91737550001-add-indexes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE INDEX scopeID_year_month_day_status_index ON slot(scopeID, year, month, day, status);
CREATE INDEX ancestorID_ancestorLevel_index ON slot_hiera(ancestorID, ancestorLevel);
CREATE INDEX scopeID_status_slotID_index ON slot(scopeID, status, slotID);
CREATE INDEX slotID_index ON slot_process(slotID);
3 changes: 0 additions & 3 deletions zmsdb/tests/Zmsdb/SlotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ public function testWriteCanceledByTime()
$dateTime = new \DateTimeImmutable('2016-04-01 11:55:00');
$slotList = (new Slot())->readRowsByScopeAndDate($scope, $dateTime->modify('+7days'));
$this->assertEquals($slotList[0]['status'], 'free');
(new Slot())->writeCanceledByTime($dateTime->modify('+8days'));
$slotList = (new Slot())->readRowsByScopeAndDate($scope, $dateTime->modify('+7days'));
$this->assertEquals($slotList[0]['status'], 'cancelled');
$slotList = (new Slot())->readRowsByScopeAndDate($scope, $dateTime->modify('+14days'));
$this->assertEquals($slotList[0]['status'], 'free');

Expand Down

0 comments on commit 0098861

Please sign in to comment.