diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-05 16:59:31 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-05 16:59:31 +0300 |
commit | 5004579b15b0585c0a26231d7422fb1d8086bd66 (patch) | |
tree | b9d0096b88813af0d2cb38c173485f56aa62ebc7 /db | |
parent | 79b8323d11cc06911b996f327c6e06fd29cafea4 (diff) | |
parent | 10c1bf2d77fd0ab21309d0b136cbc0ac11f56c77 (diff) | |
download | gitlab-ce-5004579b15b0585c0a26231d7422fb1d8086bd66.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into mia_backort[ci skip]
Diffstat (limited to 'db')
5 files changed, 49 insertions, 1 deletions
diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb new file mode 100644 index 00000000000..92f1d6f2436 --- /dev/null +++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb @@ -0,0 +1,16 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddPreferredLanguageToUsers < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + add_column :users, :preferred_language, :string + end + + def down + remove_column :users, :preferred_language + end +end 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 7b960f79c1f..7e8ff9ed67f 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: 20170502091007) do +ActiveRecord::Schema.define(version: 20170503004425) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -979,6 +979,7 @@ ActiveRecord::Schema.define(version: 20170502091007) 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 @@ -987,6 +988,7 @@ ActiveRecord::Schema.define(version: 20170502091007) 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 @@ -1334,6 +1336,7 @@ ActiveRecord::Schema.define(version: 20170502091007) do t.boolean "notified_of_own_activity" t.boolean "require_two_factor_authentication_from_group", default: false, null: false t.integer "two_factor_grace_period", default: 48, null: false + t.string "preferred_language" end add_index "users", ["admin"], name: "index_users_on_admin", using: :btree |