diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
commit | 72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 (patch) | |
tree | 2e81b28a062212375bf17d1da0ff836d6b021469 /db/migrate/20200128184209_add_usage_to_pages_domains.rb | |
parent | 9db503ef9888c984b287af44d009d884e835ce04 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200128184209_add_usage_to_pages_domains.rb')
-rw-r--r-- | db/migrate/20200128184209_add_usage_to_pages_domains.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20200128184209_add_usage_to_pages_domains.rb b/db/migrate/20200128184209_add_usage_to_pages_domains.rb new file mode 100644 index 00000000000..292490078cd --- /dev/null +++ b/db/migrate/20200128184209_add_usage_to_pages_domains.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddUsageToPagesDomains < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + PAGES_USAGE = 0 + + disable_ddl_transaction! + + def up + add_column_with_default :pages_domains, :usage, :integer, limit: 2, default: PAGES_USAGE, allow_null: false # rubocop:disable Migration/AddColumnWithDefault + end + + def down + remove_column :pages_domains, :usage + end +end |