diff options
Diffstat (limited to 'src/main/sql/dbdelta')
-rw-r--r-- | src/main/sql/dbdelta/3-jenkins_server-add-name.sql | 7 |
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; |