aboutsummaryrefslogtreecommitdiff
path: root/src/main/sql
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-12 11:03:21 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-12 11:25:28 +0100
commit19a0b028278652f3e48b2647ed71d8e7b9371939 (patch)
treec0c68b82297b99008930b1e4d7ca80ce807d174b /src/main/sql
parent9be611045bc0eba133be8d318abac9042e9888c7 (diff)
downloadesper-testing-19a0b028278652f3e48b2647ed71d8e7b9371939.tar.gz
esper-testing-19a0b028278652f3e48b2647ed71d8e7b9371939.tar.bz2
esper-testing-19a0b028278652f3e48b2647ed71d8e7b9371939.tar.xz
esper-testing-19a0b028278652f3e48b2647ed71d8e7b9371939.zip
o Adding "name" to JenkinsServer.
Diffstat (limited to 'src/main/sql')
-rw-r--r--src/main/sql/dbdelta/3-jenkins_server-add-name.sql7
1 files changed, 7 insertions, 0 deletions
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;