Added new schema for dashboard#252
Conversation
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Crola1702
left a comment
There was a problem hiding this comment.
Reviewed in a sync:
- Create the
sql/migrationsadd the queries with a migration id prefix (e.g.,01_server_status_platforms.sql - Add a
READMEfile in the new directory that shows the schema as today
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Crola1702
left a comment
There was a problem hiding this comment.
LGTM.
A final comment before merging, lets use the prefixes: 01_., 02_, because that way we can organize 99 migration scripts and not only 10
Please before merging, paste the schema diff. I.e., The schema before applying the migrations vs the schema after applying the migrations. And the commands you used
There was a problem hiding this comment.
We already have this table. So this migration should be ALTER TABLE instead
| -- dashboard queries do not need to parse job names repeatedly. | ||
|
|
||
| ALTER TABLE server_status ADD COLUMN platform_os TEXT; | ||
| ALTER TABLE server_status ADD COLUMN platform_arch TEXT; |
There was a problem hiding this comment.
Ahhh here they are. Then, I think we can drop the 01_create_table
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Pre-migration schemaThe schema below is the shape used before the platform normalization migration. It is included here so the migration history is explicit and easy to audit. CREATE TABLE IF NOT EXISTS server_status(
job_name TEXT PRIMARY KEY NOT NULL,
server_status TEXT,
release TEXT,
os_name TEXT,
project TEXT,
domain TEXT
);Target schemaAfter the migration, CREATE TABLE IF NOT EXISTS server_status(
job_name TEXT PRIMARY KEY NOT NULL,
server_status TEXT,
release TEXT,
os_name TEXT,
platform_os TEXT,
platform_arch TEXT,
project TEXT,
domain TEXT
); |
Made with GPT-5 mini
Part of #249
Haven't tested yet, the purpose is to modify the schema to allow sql queries search for OS