From 8f4ae40e3c4a93114811637c0a643ae1b7ac86bf Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski <ayufan@ayufan.eu> Date: Mon, 19 Oct 2015 13:37:20 +0200 Subject: [PATCH] Add missing migrations --- db/migrate/20151019111551_fix_build_tags.rb | 5 +++++ db/migrate/20151019111703_fail_build_without_names.rb | 5 +++++ db/schema.rb | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20151019111551_fix_build_tags.rb create mode 100644 db/migrate/20151019111703_fail_build_without_names.rb 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" -- GitLab