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:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-05 01:48:21 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-05 01:48:21 +0300
commit12fbce2eacdfbbc9bca7f7eaca6e5679ee1aaffd (patch)
tree055c994736a0408af7c6b4c5ff6ca37ec65c336c /db
parent1bf694fcb95c978e8cf32664b3ced186e7a7d850 (diff)
parent79dc817183bf1480e72016c3e6a78ac0e57d8c96 (diff)
Merge branch 'master' into 'add-sentry-js-again-with-vue'
# Conflicts: # db/schema.rb
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb7
-rw-r--r--db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb15
-rw-r--r--db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb7
-rw-r--r--db/schema.rb4
4 files changed, 32 insertions, 1 deletions
diff --git a/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb
new file mode 100644
index 00000000000..00c685cf342
--- /dev/null
+++ b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb
@@ -0,0 +1,7 @@
+class AddLastRepositoryUpdatedAtToProjects < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def change
+ add_column :projects, :last_repository_updated_at, :datetime
+ end
+end
diff --git a/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb
new file mode 100644
index 00000000000..6144d74745c
--- /dev/null
+++ b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb
@@ -0,0 +1,15 @@
+class AddIndexToLastRepositoryUpdatedAtOnProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index(:projects, :last_repository_updated_at)
+ end
+
+ def down
+ remove_concurrent_index(:projects, :last_repository_updated_at) if index_exists?(:projects, :last_repository_updated_at)
+ end
+end
diff --git a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
index a23f83205f1..08cf366f0a1 100644
--- a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
+++ b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
@@ -36,10 +36,17 @@ class RenameReservedDynamicPaths < ActiveRecord::Migration
DISSALLOWED_GROUP_PATHS = %w[
activity
+ analytics
+ audit_events
avatar
group_members
+ hooks
labels
+ ldap
+ ldap_group_links
milestones
+ notification_setting
+ pipeline_quota
subgroups
]
diff --git a/db/schema.rb b/db/schema.rb
index 44148a9bc31..80bef5ab967 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -973,6 +973,7 @@ ActiveRecord::Schema.define(version: 20170504102911) do
t.boolean "printing_merge_request_link_enabled", default: true, null: false
t.string "import_jid"
t.integer "cached_markdown_version"
+ t.datetime "last_repository_updated_at"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree
@@ -981,6 +982,7 @@ ActiveRecord::Schema.define(version: 20170504102911) do
add_index "projects", ["description"], name: "index_projects_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
add_index "projects", ["last_activity_at"], name: "index_projects_on_last_activity_at", using: :btree
add_index "projects", ["last_repository_check_failed"], name: "index_projects_on_last_repository_check_failed", using: :btree
+ add_index "projects", ["last_repository_updated_at"], name: "index_projects_on_last_repository_updated_at", using: :btree
add_index "projects", ["name"], name: "index_projects_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"}
add_index "projects", ["namespace_id"], name: "index_projects_on_namespace_id", using: :btree
add_index "projects", ["path"], name: "index_projects_on_path", using: :btree
@@ -1412,4 +1414,4 @@ ActiveRecord::Schema.define(version: 20170504102911) do
add_foreign_key "timelogs", "merge_requests", name: "fk_timelogs_merge_requests_merge_request_id", on_delete: :cascade
add_foreign_key "trending_projects", "projects", on_delete: :cascade
add_foreign_key "u2f_registrations", "users"
-end
+end \ No newline at end of file