Commit 60576da8 authored by Jason Goodman's avatar Jason Goodman Committed by Andreas Brandl

Add Migration for Strategies Column on operations_feature_flag_scopes

parent 9f38e22d
---
title: Add strategies column to operations_feature_flag_scopes table
merge_request: 29808
author:
type: other
# frozen_string_literal: true
class AddStrategiesToOperationsFeatureFlagScopes < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default :operations_feature_flag_scopes, :strategies, :jsonb, default: [{ name: "default", parameters: {} }]
end
def down
remove_column(:operations_feature_flag_scopes, :strategies)
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20190627051902) do
ActiveRecord::Schema.define(version: 20190628145246) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -2263,6 +2263,7 @@ ActiveRecord::Schema.define(version: 20190627051902) do
t.datetime_with_timezone "updated_at", null: false
t.boolean "active", null: false
t.string "environment_scope", default: "*", null: false
t.jsonb "strategies", default: [{"name"=>"default", "parameters"=>{}}], null: false
t.index ["feature_flag_id", "environment_scope"], name: "index_feature_flag_scopes_on_flag_id_and_environment_scope", unique: true, using: :btree
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment