summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 15:08:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 15:08:41 +0000
commitd47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (patch)
tree4b4efa1ccd8246fba2dc9f8816d9d2c0268e9818 /db
parentc158fa8d69c704663d289341a014c44c062cda88 (diff)
downloadgitlab-ce-d47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20191114204343_remove_milestone_id_from_epics.rb13
-rw-r--r--db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb25
-rw-r--r--db/schema.rb6
3 files changed, 15 insertions, 29 deletions
diff --git a/db/post_migrate/20191114204343_remove_milestone_id_from_epics.rb b/db/post_migrate/20191114204343_remove_milestone_id_from_epics.rb
new file mode 100644
index 00000000000..4ef6decda95
--- /dev/null
+++ b/db/post_migrate/20191114204343_remove_milestone_id_from_epics.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveMilestoneIdFromEpics < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def up
+ remove_column :epics, :milestone_id
+ end
+
+ def down
+ add_column :epics, :milestone_id, :integer
+ end
+end
diff --git a/db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb b/db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb
deleted file mode 100644
index 6aa545a1787..00000000000
--- a/db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveStorageVersionColumnFromSnippets < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- return unless column_exists?(:snippets, :storage_version)
-
- remove_column :snippets, :storage_version
- end
-
- def down
- add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
- :snippets,
- :storage_version,
- :integer,
- default: 2,
- allow_null: false
- )
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index a154f7fa993..956c7a30970 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: 2020_01_14_180546) do
+ActiveRecord::Schema.define(version: 2020_01_14_113341) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -1538,7 +1538,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
end
create_table "epics", id: :serial, force: :cascade do |t|
- t.integer "milestone_id"
t.integer "group_id", null: false
t.integer "author_id", null: false
t.integer "assignee_id"
@@ -1577,7 +1576,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
t.index ["end_date"], name: "index_epics_on_end_date"
t.index ["group_id"], name: "index_epics_on_group_id"
t.index ["iid"], name: "index_epics_on_iid"
- t.index ["milestone_id"], name: "index_milestone"
t.index ["parent_id"], name: "index_epics_on_parent_id"
t.index ["start_date"], name: "index_epics_on_start_date"
t.index ["start_date_sourcing_epic_id"], name: "index_epics_on_start_date_sourcing_epic_id", where: "(start_date_sourcing_epic_id IS NOT NULL)"
@@ -3838,6 +3836,7 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
t.string "encrypted_secret_token_iv", limit: 255
t.boolean "secret", default: false, null: false
t.string "repository_storage", limit: 255, default: "default", null: false
+ t.integer "storage_version", default: 2, null: false
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["content"], name: "index_snippets_on_content_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["created_at"], name: "index_snippets_on_created_at"
@@ -4590,7 +4589,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
add_foreign_key "epics", "epics", column: "start_date_sourcing_epic_id", name: "fk_9d480c64b2", on_delete: :nullify
add_foreign_key "epics", "milestones", column: "due_date_sourcing_milestone_id", name: "fk_3c1fd1cccc", on_delete: :nullify
add_foreign_key "epics", "milestones", column: "start_date_sourcing_milestone_id", name: "fk_1fbed67632", on_delete: :nullify
- add_foreign_key "epics", "milestones", on_delete: :nullify
add_foreign_key "epics", "namespaces", column: "group_id", name: "fk_f081aa4489", on_delete: :cascade
add_foreign_key "epics", "users", column: "assignee_id", name: "fk_dccd3f98fc", on_delete: :nullify
add_foreign_key "epics", "users", column: "author_id", name: "fk_3654b61b03", on_delete: :cascade