fix: displaying valid metrics and removing type assertions
This commit is contained in:
1 parent
5a8d0432ff
commit
0fc013246d
3 files changed
+42
-33
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import type { Pool } from "pg";
|
||||
|
||||
export const addShowPageSpeedToStatusPages = async (pool: Pool) => {
|
||||
await pool.query(`
|
||||
ALTER TABLE status_pages
|
||||
ADD COLUMN IF NOT EXISTS show_page_speed BOOLEAN DEFAULT FALSE;
|
||||
`);
|
||||
};
|
||||
|
||||
export const dropShowPageSpeedFromStatusPages = async (pool: Pool) => {
|
||||
await pool.query(`
|
||||
ALTER TABLE status_pages
|
||||
DROP COLUMN IF EXISTS show_page_speed;
|
||||
`);
|
||||
};
|
||||
@@ -21,6 +21,7 @@ import { createStatusPages, dropStatusPages } from "./0018_create_status_pages.j
|
||||
import { createAppSettings, dropAppSettings } from "./0019_create_app_settings.js";
|
||||
import { createContinuousAggregates, dropContinuousAggregates } from "./0020_create_continuous_aggregates.js";
|
||||
import { createRetentionCompression, dropRetentionCompression } from "./0021_create_retention_compression.js";
|
||||
import { addShowPageSpeedToStatusPages, dropShowPageSpeedFromStatusPages } from "./0022_add_show_page_speed_to_status_pages.js";
|
||||
|
||||
const SERVICE_NAME = "TimescaleDB Migrations";
|
||||
|
||||
@@ -52,6 +53,7 @@ const migrations: MigrationEntry[] = [
|
||||
{ name: "0019_create_app_settings", up: createAppSettings, down: dropAppSettings },
|
||||
{ name: "0020_create_continuous_aggregates", up: createContinuousAggregates, down: dropContinuousAggregates },
|
||||
{ name: "0021_create_retention_compression", up: createRetentionCompression, down: dropRetentionCompression },
|
||||
{ name: "0022_add_show_page_speed_to_status_pages", up: addShowPageSpeedToStatusPages, down: dropShowPageSpeedFromStatusPages },
|
||||
];
|
||||
|
||||
const ensureMigrationsTable = async (pool: Pool) => {
|
||||
|
||||
Reference in new issue
Block a user