diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-03-06 22:16:01 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-03-06 22:16:01 +0300 |
commit | 79b8f02bb1780b3de9eb01d69aa3ff59954d5324 (patch) | |
tree | 1391a19c6577830448888b5de6fb6d2d10b00f01 /db | |
parent | b696cbc5a095bcd9dff445b7579651a615977e3d (diff) | |
parent | 3b35d1f8c153fb31af66049ba5461f9b39c66397 (diff) |
Merge branch 'pipeline-blocking-actions' into 'master'
Make manual actions blocking
Closes #26360 and #22628
See merge request !9585
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb new file mode 100644 index 00000000000..9020e0d054c --- /dev/null +++ b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb @@ -0,0 +1,19 @@ +class MigrateLegacyManualActions < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + execute <<-EOS + UPDATE ci_builds SET status = 'manual', allow_failure = true + WHERE ci_builds.when = 'manual' AND ci_builds.status = 'skipped'; + EOS + end + + def down + execute <<-EOS + UPDATE ci_builds SET status = 'skipped', allow_failure = false + WHERE ci_builds.when = 'manual' AND ci_builds.status = 'manual'; + EOS + end +end diff --git a/db/schema.rb b/db/schema.rb index 911cb22c8e5..6f7dd3e4768 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: 20170305203726) do +ActiveRecord::Schema.define(version: 20170306170512) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |