diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-02 12:09:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-02 12:09:03 +0000 |
commit | c80b69a93fb4a6708b3337aa6e243ad09fe1d295 (patch) | |
tree | e3ad5a541f73d9457ae29fcf915c0fc6538cc149 /db | |
parent | 94823a9248837114ec84582f83b642ec45fe68ad (diff) | |
download | gitlab-ce-c80b69a93fb4a6708b3337aa6e243ad09fe1d295.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb | 9 | ||||
-rw-r--r-- | db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb | 20 | ||||
-rw-r--r-- | db/schema_migrations/20201027211138 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20201028204306 | 1 | ||||
-rw-r--r-- | db/structure.sql | 4 |
5 files changed, 33 insertions, 2 deletions
diff --git a/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb b/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb new file mode 100644 index 00000000000..92d9025706f --- /dev/null +++ b/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class IncreaseDefaultDiffMaxPatchBytes < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + change_column_default(:application_settings, :diff_max_patch_bytes, from: 102400, to: 204800) + end +end diff --git a/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb b/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb new file mode 100644 index 00000000000..11d47904e67 --- /dev/null +++ b/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class MigrateDefaultDiffMaxPatchBytesToMinimum200kb < ActiveRecord::Migration[6.0] + DOWNTIME = false + MAX_SIZE = 200.kilobytes + + class ApplicationSetting < ActiveRecord::Base + self.table_name = 'application_settings' + end + + def up + table = ApplicationSetting.arel_table + ApplicationSetting.where(table[:diff_max_patch_bytes].lt(MAX_SIZE)).update_all(diff_max_patch_bytes: MAX_SIZE) + end + + def down + table = ApplicationSetting.arel_table + ApplicationSetting.where(table[:diff_max_patch_bytes].eq(MAX_SIZE)).update_all(diff_max_patch_bytes: 100.kilobytes) + end +end diff --git a/db/schema_migrations/20201027211138 b/db/schema_migrations/20201027211138 new file mode 100644 index 00000000000..5e36445702b --- /dev/null +++ b/db/schema_migrations/20201027211138 @@ -0,0 +1 @@ +402e9a6e92802888ba01ee216850ab5b0fe9997a84415c9ffe8d5d37a9823220
\ No newline at end of file diff --git a/db/schema_migrations/20201028204306 b/db/schema_migrations/20201028204306 new file mode 100644 index 00000000000..03b68c9a0d1 --- /dev/null +++ b/db/schema_migrations/20201028204306 @@ -0,0 +1 @@ +ec5bab20a1b591b77b48b85dc0b871e88a41891d256201b7d8eb86195ef1c4ad
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index dbb20221d96..71a66997b20 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9207,7 +9207,7 @@ CREATE TABLE application_settings ( custom_project_templates_group_id integer, usage_stats_set_by_user_id integer, receive_max_input_size integer, - diff_max_patch_bytes integer DEFAULT 102400 NOT NULL, + diff_max_patch_bytes integer DEFAULT 204800 NOT NULL, archive_builds_in_seconds integer, commit_email_hostname character varying, protected_ci_variables boolean DEFAULT true NOT NULL, @@ -12749,10 +12749,10 @@ CREATE TABLE group_wiki_repositories ( CREATE TABLE historical_data ( id integer NOT NULL, + date date, active_user_count integer, created_at timestamp without time zone, updated_at timestamp without time zone, - date date, recorded_at timestamp with time zone, CONSTRAINT check_640e8cf66c CHECK ((recorded_at IS NOT NULL)) ); |