Don't delete user_projects yet! Needed for possible recovery actions.

This commit is contained in:
Martin Artnik 2021-10-01 15:37:39 +02:00
parent 34b0aec5b7
commit 31d77cc7c4

View file

@ -17,8 +17,6 @@ class MigrateToNewUserRoles < ActiveRecord::Migration[6.1]
create_user_assignments(UserProject.normal_user, normal_user_role)
create_user_assignments(UserProject.technician, technician_role)
create_user_assignments(UserProject.viewer, viewer_role)
UserProject.delete_all
end
dir.down do
project_assignments = UserAssignment.joins(:user_role).where(assignable_type: 'Project')