diff options
-rw-r--r-- | db/migrate/20151023112551_fail_build_with_empty_name.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 2 |
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" |