From 656f1c2629a1e6be6a69005af03e17d047b00584 Mon Sep 17 00:00:00 2001 From: Patrik Segedy Date: Wed, 10 Jul 2024 13:21:15 +0200 Subject: [PATCH] RHINENG-10940: add bootc column to system_platform --- database_admin/migrations/128_system_platform_bootc.down.sql | 1 + database_admin/migrations/128_system_platform_bootc.up.sql | 1 + database_admin/schema/create_schema.sql | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 database_admin/migrations/128_system_platform_bootc.down.sql create mode 100644 database_admin/migrations/128_system_platform_bootc.up.sql diff --git a/database_admin/migrations/128_system_platform_bootc.down.sql b/database_admin/migrations/128_system_platform_bootc.down.sql new file mode 100644 index 000000000..1b9197459 --- /dev/null +++ b/database_admin/migrations/128_system_platform_bootc.down.sql @@ -0,0 +1 @@ +ALTER TABLE system_platform DROP COLUMN IF EXISTS bootc; diff --git a/database_admin/migrations/128_system_platform_bootc.up.sql b/database_admin/migrations/128_system_platform_bootc.up.sql new file mode 100644 index 000000000..998ba3514 --- /dev/null +++ b/database_admin/migrations/128_system_platform_bootc.up.sql @@ -0,0 +1 @@ +ALTER TABLE system_platform ADD COLUMN IF NOT EXISTS bootc BOOLEAN NOT NULL DEFAULT false; diff --git a/database_admin/schema/create_schema.sql b/database_admin/schema/create_schema.sql index a8471b4ad..1b8efa6e1 100644 --- a/database_admin/schema/create_schema.sql +++ b/database_admin/schema/create_schema.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS schema_migrations INSERT INTO schema_migrations -VALUES (127, false); +VALUES (128, false); -- --------------------------------------------------------------------------- -- Functions @@ -745,6 +745,7 @@ CREATE TABLE IF NOT EXISTS system_platform template_id BIGINT, yum_checksum TEXT CHECK (NOT empty(yum_checksum)), arch TEXT CHECK (NOT empty(arch)), + bootc BOOLEAN NOT NULL DEFAULT false, PRIMARY KEY (rh_account_id, id), UNIQUE (rh_account_id, inventory_id), CONSTRAINT reporter_id FOREIGN KEY (reporter_id) REFERENCES reporter (id),