From 19a0b028278652f3e48b2647ed71d8e7b9371939 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 12 Jan 2013 11:03:21 +0100 Subject: o Adding "name" to JenkinsServer. --- src/main/sql/dbdelta/3-jenkins_server-add-name.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/main/sql/dbdelta/3-jenkins_server-add-name.sql (limited to 'src/main/sql/dbdelta') diff --git a/src/main/sql/dbdelta/3-jenkins_server-add-name.sql b/src/main/sql/dbdelta/3-jenkins_server-add-name.sql new file mode 100644 index 0000000..4d6a58f --- /dev/null +++ b/src/main/sql/dbdelta/3-jenkins_server-add-name.sql @@ -0,0 +1,7 @@ +ALTER TABLE jenkins_server ADD name VARCHAR(100); + +UPDATE jenkins_server SET name = regexp_replace(url, '^https?://([^/]*).*', '\1'); + +--//@UNDO + +ALTER TABLE jenkins_server DROP name; -- cgit v1.2.3