summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/migrate/20151019111551_fix_build_tags.rb5
-rw-r--r--db/migrate/20151019111703_fail_build_without_names.rb5
-rw-r--r--db/schema.rb2
3 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20151019111551_fix_build_tags.rb b/db/migrate/20151019111551_fix_build_tags.rb
new file mode 100644
index 00000000000..84b142183f8
--- /dev/null
+++ b/db/migrate/20151019111551_fix_build_tags.rb
@@ -0,0 +1,5 @@
+class FixBuildTags < ActiveRecord::Migration
+ def change
+ execute("UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'")
+ end
+end
diff --git a/db/migrate/20151019111703_fail_build_without_names.rb b/db/migrate/20151019111703_fail_build_without_names.rb
new file mode 100644
index 00000000000..546b03d8129
--- /dev/null
+++ b/db/migrate/20151019111703_fail_build_without_names.rb
@@ -0,0 +1,5 @@
+class FailBuildWithoutNames < ActiveRecord::Migration
+ def change
+ execute("UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'")
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b05fa708775..93afea35eb5 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: 20151016195706) do
+ActiveRecord::Schema.define(version: 20151019111703) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"