diff options
author | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2018-11-07 00:16:49 +0300 |
---|---|---|
committer | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2019-02-06 19:33:56 +0300 |
commit | 27f7771ae1a4b5f9d973a55ccbbbe30b0e05f100 (patch) | |
tree | 6848af95359ff3cb1d84259df159a620b4b64bd5 /db | |
parent | 20c83bbdb0a9729a308957397b37a2569486116f (diff) |
Add setting for first day of the week
Diffstat (limited to 'db')
3 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20181027114222_add_first_day_of_week_to_user_preferences.rb b/db/migrate/20181027114222_add_first_day_of_week_to_user_preferences.rb new file mode 100644 index 00000000000..a0e76c2186e --- /dev/null +++ b/db/migrate/20181027114222_add_first_day_of_week_to_user_preferences.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddFirstDayOfWeekToUserPreferences < ActiveRecord::Migration + DOWNTIME = false + + def change + add_column :user_preferences, :first_day_of_week, :integer + end +end diff --git a/db/migrate/20181028120717_add_default_first_day_of_week_to_application_settings.rb b/db/migrate/20181028120717_add_default_first_day_of_week_to_application_settings.rb new file mode 100644 index 00000000000..110a48d4d35 --- /dev/null +++ b/db/migrate/20181028120717_add_default_first_day_of_week_to_application_settings.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddDefaultFirstDayOfWeekToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + DOWNTIME = false + + def up + add_column_with_default(:application_settings, :default_first_day_of_week, :integer, default: 0) + end + + def down + remove_column(:application_settings, :default_first_day_of_week) + end +end diff --git a/db/schema.rb b/db/schema.rb index 20c8dab4c3e..aef0f234a72 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -168,6 +168,7 @@ ActiveRecord::Schema.define(version: 20190131122559) do t.string "commit_email_hostname" t.boolean "protected_ci_variables", default: false, null: false t.string "runners_registration_token_encrypted" + t.integer "default_first_day_of_week", default: 0, null: false t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id", using: :btree end @@ -2153,6 +2154,7 @@ ActiveRecord::Schema.define(version: 20190131122559) do t.integer "merge_request_notes_filter", limit: 2, default: 0, null: false t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "updated_at", null: false + t.integer "first_day_of_week" t.string "issues_sort" t.string "merge_requests_sort" t.index ["user_id"], name: "index_user_preferences_on_user_id", unique: true, using: :btree |