summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-08-08 12:44:12 -0700
committerShawn O. Pearce <sop@google.com>2009-08-08 12:44:12 -0700
commiteb128d0c256ad036f75097d708a16dc056417e66 (patch)
treef61c7025d349185416d26e44eae14e4666dd1072
parent278d48534e9a9726ec1ffc9157a3269705ede6fa (diff)
Correct Owner project_rights min_values during upgrade
One of my servers had min_value = 0 for the project owner rights; I'm not sure how that happened but it isn't a proper value for the category, so it displays funny in the web UI. Update them to 1 where the max_value is already 1. Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--src/main/webapp/WEB-INF/sql/upgrade015_016_part1_mysql.sql4
-rw-r--r--src/main/webapp/WEB-INF/sql/upgrade015_016_part1_postgres.sql4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_mysql.sql b/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_mysql.sql
index e87e4651d6..a796bc39d3 100644
--- a/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_mysql.sql
+++ b/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_mysql.sql
@@ -69,4 +69,8 @@ CREATE UNIQUE INDEX accounts_ssh_user_name_key
ON accounts (ssh_user_name);
+UPDATE project_rights SET min_value=1
+WHERE category_id='OWN' AND min_value=0 AND max_value=1;
+
+
UPDATE schema_version SET version_nbr = 16;
diff --git a/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_postgres.sql b/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_postgres.sql
index a56bde0066..ac89e54cf8 100644
--- a/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_postgres.sql
+++ b/src/main/webapp/WEB-INF/sql/upgrade015_016_part1_postgres.sql
@@ -95,4 +95,8 @@ CREATE UNIQUE INDEX accounts_ssh_user_name_key
ON accounts (ssh_user_name);
+UPDATE project_rights SET min_value=1
+WHERE category_id='OWN' AND min_value=0 AND max_value=1;
+
+
UPDATE schema_version SET version_nbr = 16;