Commit 3e6181db authored by Valery Sizov's avatar Valery Sizov

Make migrations reversible

parent 93a2cc09
class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration
def change
def up
add_column :application_settings, :default_project_visibility, :integer
visibility = Settings.gitlab.default_projects_features['visibility_level']
execute("update application_settings set default_project_visibility = #{visibility}")
end
def down
remove_column :application_settings, :default_project_visibility
end
end
class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration
def change
def up
execute("DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\
SELECT id FROM namespaces WHERE type='Group')")
end
def down
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment