Add upload types to group files
When uploading a file to a group (manage group on "My group"), users should select from a type dropdown what type of file it is (contract, report, poster, ..., other).
- These files are internally called
attachments
- New field is an enum (see other models for examples)
- New field must be set as required (client side and server side validation)
- Migration must set some default value for all existing files (set them to other)
For creating a database migration, see https://edgeguides.rubyonrails.org/active_record_migrations.html
In short, bundle exec rails generation migration Add<FieldName>ToAttachments <fieldname>:<fieldtype>
and then modify the created migration.