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:
authorRuben Davila <rdavila84@gmail.com>2017-05-05 02:51:18 +0300
committerRuben Davila <rdavila84@gmail.com>2017-05-05 02:51:18 +0300
commit7fd42698aae14c8d0a064716f90274f1de54e496 (patch)
tree552d6f47cde2ab29571b09fdc5a97c3b1dc70ee6 /db
parentb396668ec55fb866ef578e5f0e60df8b13519613 (diff)
parentbacf652a3794c4da71312982b7617542363c1441 (diff)
Merge branch 'master' into 28433-internationalise-cycle-analytics-page
Conflicts: lib/gitlab/cycle_analytics/review_stage.rb lib/gitlab/cycle_analytics/staging_stage.rb lib/gitlab/cycle_analytics/test_stage.rb
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb2
-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/migrate/markdown_cache_limits_to_mysql.rb13
-rw-r--r--db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb7
-rw-r--r--db/schema.rb4
6 files changed, 47 insertions, 1 deletions
diff --git a/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb b/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
new file mode 100644
index 00000000000..008a94d8334
--- /dev/null
+++ b/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
@@ -0,0 +1,2 @@
+# rubocop:disable all
+require_relative 'markdown_cache_limits_to_mysql'
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/migrate/markdown_cache_limits_to_mysql.rb b/db/migrate/markdown_cache_limits_to_mysql.rb
new file mode 100644
index 00000000000..f6686db3dc0
--- /dev/null
+++ b/db/migrate/markdown_cache_limits_to_mysql.rb
@@ -0,0 +1,13 @@
+class MarkdownCacheLimitsToMysql < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def up
+ return unless Gitlab::Database.mysql?
+
+ change_column :snippets, :content_html, :text, limit: 2147483647
+ end
+
+ def down
+ # no-op
+ 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 23cf517e6c6..132549ab34c 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: 20170426181740) do
+ActiveRecord::Schema.define(version: 20170503004425) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -971,6 +971,7 @@ ActiveRecord::Schema.define(version: 20170426181740) 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
@@ -979,6 +980,7 @@ ActiveRecord::Schema.define(version: 20170426181740) 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