summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-19 13:37:20 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-20 19:24:41 +0200
commit8f4ae40e3c4a93114811637c0a643ae1b7ac86bf (patch)
treeae76e3a42720ee77b33ad1bee90df7e1f18be860 /db
parent249a9476d44e89bf1ab12fbc40bf81478faafd12 (diff)
downloadgitlab-ce-8f4ae40e3c4a93114811637c0a643ae1b7ac86bf.tar.gz
Add missing migrations
Diffstat (limited to 'db')
-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"