summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 18:06:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 18:06:00 +0000
commit77a73903aa803869d0ab7fe544cc2d8b1a6aa1e0 (patch)
tree0773f62090b7a896b29b8b08152565ba976716a8 /db
parentded8ee5a09a1a02209adf179ac7d6e456703726a (diff)
downloadgitlab-ce-77a73903aa803869d0ab7fe544cc2d8b1a6aa1e0.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb23
-rw-r--r--db/schema.rb3
2 files changed, 25 insertions, 1 deletions
diff --git a/db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb b/db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb
new file mode 100644
index 00000000000..8db11724874
--- /dev/null
+++ b/db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class AddEnabledToGrafanaIntegrations < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(
+ :grafana_integrations,
+ :enabled,
+ :boolean,
+ allow_null: false,
+ default: false
+ )
+ end
+
+ def down
+ remove_column(:grafana_integrations, :enabled)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b07ba57ba77..f6a445f3da6 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2019_10_26_124116) do
+ActiveRecord::Schema.define(version: 2019_10_29_191901) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -1809,6 +1809,7 @@ ActiveRecord::Schema.define(version: 2019_10_26_124116) do
t.string "encrypted_token", limit: 255, null: false
t.string "encrypted_token_iv", limit: 255, null: false
t.string "grafana_url", limit: 1024, null: false
+ t.boolean "enabled", default: false, null: false
t.index ["project_id"], name: "index_grafana_integrations_on_project_id"
end