mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
* chore: convert workspace agent stats from json to table * chore: convert agent stats to use a table Backwards compatibility becomes hard when all agent stats are in a JSON blob. We also want to query this table for new agents that are failing health checks so we can display it in the UI. * Fix migration using default values
10 lines
322 B
SQL
10 lines
322 B
SQL
ALTER TABLE workspace_agent_stats RENAME TO agent_stats;
|
|
|
|
ALTER TABLE agent_stats ADD COLUMN payload jsonb NOT NULL DEFAULT '{}'::jsonb;
|
|
ALTER TABLE agent_stats DROP COLUMN connections_by_proto,
|
|
DROP COLUMN connection_count,
|
|
DROP COLUMN rx_packets,
|
|
DROP COLUMN rx_bytes,
|
|
DROP COLUMN tx_packets,
|
|
DROP COLUMN tx_bytes;
|