-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store cache control headers, change index order
- Loading branch information
Showing
4 changed files
with
42 additions
and
32 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
services/feed-requests/migrations/Migration20241231120419.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
|
||
export class Migration20241231120419 extends Migration { | ||
|
||
async up(): Promise<void> { | ||
this.addSql(`ALTER TYPE request_partitioned_status ADD VALUE 'CACHE_CONTROL_SKIPPED';`); | ||
// switch the created_at and status of the index | ||
this.addSql(`DROP INDEX request_partitioned_lookupkey_created_at_status_index;`); | ||
this.addSql(`CREATE INDEX request_partitioned_lookupkey_status_created_at_index ON request_partitioned (lookup_key, status, created_at);`); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql(`ALTER TYPE request_partitioned_status DROP VALUE 'CACHE_CONTROL_SKIPPED';`); | ||
// switch the created_at and status of the index | ||
this.addSql(`DROP INDEX request_partitioned_lookupkey_status_created_at_index;`); | ||
this.addSql(`CREATE INDEX request_partitioned_lookupkey_created_at_status_index ON request_partitioned (lookup_key, created_at, status);`); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters