Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-08 18:03:07 +0300
committerNick Thomas <nick@gitlab.com>2018-10-09 13:15:02 +0300
commitff9881d99193bd64d112bb03311aecd75f4270ae (patch)
treea5e336ea308e89f71c0e41cdeccedb47eef59337 /db
parentc616327c1221dc91318a35769e01ab6932d497ea (diff)
Remove unencrypted webhook token and URL columns
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20181008145341_steal_encrypt_columns.rb15
-rw-r--r--db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb10
-rw-r--r--db/schema.rb4
3 files changed, 26 insertions, 3 deletions
diff --git a/db/post_migrate/20181008145341_steal_encrypt_columns.rb b/db/post_migrate/20181008145341_steal_encrypt_columns.rb
new file mode 100644
index 00000000000..c107ac72913
--- /dev/null
+++ b/db/post_migrate/20181008145341_steal_encrypt_columns.rb
@@ -0,0 +1,15 @@
+class StealEncryptColumns < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ Gitlab::BackgroundMigration.steal('EncryptColumns')
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb b/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb
new file mode 100644
index 00000000000..0c44bca5f1a
--- /dev/null
+++ b/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb
@@ -0,0 +1,10 @@
+class RemoveWebHooksTokenAndUrl < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ remove_column :web_hooks, :token, :string
+ remove_column :web_hooks, :url, :string, limit: 2000
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 4ff0272428a..d47156c6da4 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: 20181002172433) do
+ActiveRecord::Schema.define(version: 20181008145359) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -2256,7 +2256,6 @@ ActiveRecord::Schema.define(version: 20181002172433) do
add_index "web_hook_logs", ["web_hook_id"], name: "index_web_hook_logs_on_web_hook_id", using: :btree
create_table "web_hooks", force: :cascade do |t|
- t.string "url", limit: 2000
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
@@ -2269,7 +2268,6 @@ ActiveRecord::Schema.define(version: 20181002172433) do
t.boolean "note_events", default: false, null: false
t.boolean "enable_ssl_verification", default: true
t.boolean "wiki_page_events", default: false, null: false
- t.string "token"
t.boolean "pipeline_events", default: false, null: false
t.boolean "confidential_issues_events", default: false, null: false
t.boolean "repository_update_events", default: false, null: false