From 66cdd4647dbfd3cb8767e94a1b90d80932e2f6b0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 19 Apr 2017 11:54:51 -0500 Subject: [PATCH] update the 1.11 to 1.12 upgrade schema for BDR in Fedora we are trying to use BDR to make the koji db more resilient in order to get the schema to apply I had to make some changes in order for the schema changes to be applied. see http://bdr-project.org/docs/stable/ddl-replication-statements.html for more info there is examples that matched what we are doing at the bottom of the page in the section "8.2.3. DDL statements with restrictions" Signed-off-by: Dennis Gilmore --- docs/schema-upgrade-1.11-1.12.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/schema-upgrade-1.11-1.12.sql b/docs/schema-upgrade-1.11-1.12.sql index 10bcaf5a..8659de78 100644 --- a/docs/schema-upgrade-1.11-1.12.sql +++ b/docs/schema-upgrade-1.11-1.12.sql @@ -4,6 +4,8 @@ BEGIN; INSERT INTO permissions (name) VALUES ('image'); -ALTER TABLE repo ADD COLUMN dist BOOLEAN DEFAULT 'false'; +ALTER TABLE repo ADD COLUMN dist BOOLEAN; +ALTER TABLE repo ALTER COLUMN dist SET DEFAULT 'false'; +UPDATE repo SET dist = 'false'; COMMIT;