Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature zms 3430 create db indices #821

Merged
merged 5 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading