summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181227063544_add_secret_word_to_snippet.rb11
-rw-r--r--db/schema.rb3
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20181227063544_add_secret_word_to_snippet.rb b/db/migrate/20181227063544_add_secret_word_to_snippet.rb
new file mode 100644
index 00000000000..151ef94811c
--- /dev/null
+++ b/db/migrate/20181227063544_add_secret_word_to_snippet.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddSecretWordToSnippet < ActiveRecord::Migration[5.0]
+ DOWNTIME = false
+
+ def change
+ add_column :snippets, :encrypted_secret, :string, limit: 25
+ add_column :snippets, :encrypted_secret_iv, :string, limit: 25
+ add_column :snippets, :encrypted_secret_salt, :string, limit: 25
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 70f3a42e7f8..f92a93a8518 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3238,6 +3238,9 @@ ActiveRecord::Schema.define(version: 2019_09_05_223900) do
t.integer "cached_markdown_version"
t.text "description"
t.text "description_html"
+ t.string "encrypted_secret"
+ t.string "encrypted_secret_iv"
+ t.string "encrypted_secret_salt"
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["file_name"], name: "index_snippets_on_file_name_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["project_id"], name: "index_snippets_on_project_id"