diff options
author | Jon Kolb <kolbyjack@gmail.com> | 2019-06-11 17:48:42 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-06-25 09:31:23 +0800 |
commit | 4e283ee706b11fd3b918230976addc9a70603ce6 (patch) | |
tree | 17c39d55c76ce24380f4805c733c823b63222d85 /db | |
parent | db9783f7826ed5ba58a8941dd80a1cd7dda517b0 (diff) | |
download | gitlab-ce-4e283ee706b11fd3b918230976addc9a70603ce6.tar.gz |
Limit time tracking values to hours
Adds an instance setting to limit display of time tracking
values to hours only
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190611090827_add_time_tracking_display_hours_only_to_application_settings.rb | 21 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20190611090827_add_time_tracking_display_hours_only_to_application_settings.rb b/db/migrate/20190611090827_add_time_tracking_display_hours_only_to_application_settings.rb new file mode 100644 index 00000000000..f4daf0d1863 --- /dev/null +++ b/db/migrate/20190611090827_add_time_tracking_display_hours_only_to_application_settings.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddTimeTrackingDisplayHoursOnlyToApplicationSettings < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default :application_settings, :time_tracking_display_hours_only, :boolean, default: false, allow_null: false + end + + def down + remove_column :application_settings, :time_tracking_display_hours_only + end +end diff --git a/db/schema.rb b/db/schema.rb index b81558178b9..d39833f9755 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -229,6 +229,7 @@ ActiveRecord::Schema.define(version: 20190620112608) do t.integer "custom_project_templates_group_id" t.boolean "elasticsearch_limit_indexing", default: false, null: false t.string "geo_node_allowed_ips", default: "0.0.0.0/0, ::/0" + t.boolean "time_tracking_display_hours_only", default: false, null: false t.index ["custom_project_templates_group_id"], name: "index_application_settings_on_custom_project_templates_group_id", using: :btree t.index ["file_template_project_id"], name: "index_application_settings_on_file_template_project_id", using: :btree t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id", using: :btree |