Skip to content

Commit c4081ea

Browse files
committed
chore: add copy-cache command
1 parent 840688d commit c4081ea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scripts/migrations/README-DB-BLUE-GREEN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pnpm db:copy-cache -f blue
4343
### How Cache Data Copy Works
4444

4545
1. The script reads the PostgreSQL connection details from the `DATABASE_URL` environment variable
46-
2. It handles the two specific cache tables: `price_cache` and `metadata_cache`
46+
2. It handles the three specific cache tables: `price_cache`, `metadata_cache` and `strategy_timings`
4747
3. For each table:
4848
- It truncates the target table
4949
- Copies all data from the source to the target table
@@ -55,5 +55,6 @@ The script only copies the following tables, which contain cached data from exte
5555

5656
- `price_cache`: Stores token price information
5757
- `metadata_cache`: Stores token metadata
58+
- `strategy_timings`: Stores strategy timings (fetched from contract calls)
5859

5960
All other tables are managed through the regular migration process and are not part of the blue-green deployment cache copying strategy.

scripts/migrations/src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
export const BLUE_DB = "GitcoinDatalayerBlue";
77
export const GREEN_DB = "GitcoinDatalayerGreen";
88

9-
// These are the only two cache tables we need to handle
10-
export const CACHE_TABLES = ["price_cache", "metadata_cache"];
9+
// These are the only three cache tables we need to handle
10+
export const CACHE_TABLES = ["price_cache", "metadata_cache", "strategy_timings"];
1111

1212
/**
1313
* Interface for database connection details

0 commit comments

Comments
 (0)