Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-23 14:33:44 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-23 14:33:44 +0300
commit0b25d837b8b97010a5ea65002ca09f1aa7f3e504 (patch)
tree2c747b2d6a4fcfb3030afc3374874b090023f028 /db
parent2afb2d3c6788d14039c64dcc2b1ee290c48a0de4 (diff)
Fail builds that also have empty string
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20151023112551_fail_build_with_empty_name.rb5
-rw-r--r--db/schema.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/db/migrate/20151023112551_fail_build_with_empty_name.rb b/db/migrate/20151023112551_fail_build_with_empty_name.rb
new file mode 100644
index 00000000000..f069bc60ac7
--- /dev/null
+++ b/db/migrate/20151023112551_fail_build_with_empty_name.rb
@@ -0,0 +1,5 @@
+class FailBuildWithEmptyName < ActiveRecord::Migration
+ def change
+ execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'")
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0fec00ebf8f..1551956c8bc 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151020173906) do
+ActiveRecord::Schema.define(version: 20151023112551) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"