blob: d3557efecbdfae1861c84066e4ea0eeca5f1e366 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
class MigrateNullWikiAccessLevels < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
class ProjectFeature < ActiveRecord::Base
include EachBatch
self.table_name = 'project_features'
end
def up
ProjectFeature.where(wiki_access_level: nil).each_batch do |relation|
relation.update_all(wiki_access_level: 20)
end
end
def down
# there is no way to rollback this change, there are no downsides in keeping migrated data.
end
end
|