gitlab-org--gitlab-foss/db/migrate
Douwe Maan 317206300d Merge branch 'configurable-attachment-size' into 'master'
Support configurable attachment size in Application Settings page

### What does this MR do?

This MR provides the ability to configure the maximum size of an attachment inside a note. A parameter has been added to the Application Settings page.

### Are there points in the code the reviewer needs to double check?

What should be done with the legacy note attachment validation? I added code to make the validation work with the configurable setting. I could see an issue where an admin lowers the limit from 10 megabytes to 5 megabytes, which could cause an existing model to be invalid.

### Why was this MR needed?

We often have attachments that exceed 10 MB, and it would be nice to be able to override the defaults.

### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?

See Issue #1258

### Screenshots

Before:

![Screen_Shot_2015-03-29_at_3.06.53_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/6013a1dbc8cf61a63e93744149937fa0/Screen_Shot_2015-03-29_at_3.06.53_PM.png)

After:

![Screen_Shot_2015-03-29_at_3.12.34_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/f3518af7e8653ba40f0a3579456da6ad/Screen_Shot_2015-03-29_at_3.12.34_PM.png)

See merge request !407
2015-04-03 08:47:55 +00:00
..
20121220064453_init_schema.rb Squash migrations for years 2011 and 2012 2014-02-04 17:11:30 +02:00
20130102143055_rename_owner_to_creator_for_project.rb
20130110172407_add_public_to_project.rb
20130123114545_add_issues_tracker_to_project.rb Issue tracker field added to projects 2013-02-28 16:10:00 +04:00
20130125090214_add_user_permissions.rb can_create_group, can_create_team boolean fields for user 2013-01-25 11:08:22 +02:00
20130131070232_remove_private_flag_from_project.rb add path and path_with_namespace to api project entity 2013-01-31 09:11:35 +02:00
20130206084024_add_description_to_namsespace.rb Description to groups added 2013-02-28 17:14:21 +04:00
20130207104426_add_description_to_teams.rb Description added to temas 2013-02-28 17:15:22 +04:00
20130211085435_add_issues_tracker_id_to_project.rb Migration added 2013-02-28 16:11:13 +04:00
20130214154045_rename_state_to_merge_status_in_milestone.rb State renamed to merge_status 2013-02-18 14:43:49 +04:00
20130218140952_add_state_to_issue.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141038_add_state_to_merge_request.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141117_add_state_to_milestone.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141258_convert_closed_to_state_in_issue.rb Data converting migrations was wrong. Fixed 2013-02-27 12:53:36 +04:00
20130218141327_convert_closed_to_state_in_merge_request.rb Data converting migrations was wrong. Fixed 2013-02-27 12:53:36 +04:00
20130218141344_convert_closed_to_state_in_milestone.rb Data converting migrations was wrong. Fixed 2013-02-27 12:53:36 +04:00
20130218141444_remove_merged_from_merge_request.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141507_remove_closed_from_issue.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141536_remove_closed_from_merge_request.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130218141554_remove_closed_from_milestone.rb Migrations refactored ro support data convertion 2013-02-18 18:54:30 +04:00
20130220124204_add_new_merge_status_to_merge_request.rb Migrations for convertion merge_status added 2013-02-20 17:49:33 +04:00
20130220125544_convert_merge_status_in_merge_request.rb Migrations for convertion merge_status added 2013-02-20 17:49:33 +04:00
20130220125545_remove_merge_status_from_merge_request.rb Migrations for convertion merge_status added 2013-02-20 17:49:33 +04:00
20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb Migrations for convertion merge_status added 2013-02-20 17:49:33 +04:00
20130304104623_add_state_to_user.rb Migrations added 2013-03-04 18:51:00 +04:00
20130304104740_convert_blocked_to_state.rb Typo fixed 2013-03-05 14:29:44 +04:00
20130304105317_remove_blocked_from_user.rb Migrations added 2013-03-04 18:51:00 +04:00
20130315124931_user_color_scheme.rb add dark solarized theme for code preview 2013-03-15 15:09:34 +02:00
20130318212250_add_snippets_to_features.rb Move snippets to own tab as feature. Make it disabled for new projects by default 2013-03-18 23:33:41 +02:00
20130319214458_create_forked_project_links.rb Made fixes suggested by @randx in pull request 2013-05-02 16:41:33 -04:00
20130323174317_add_private_to_snippets.rb Migrations to convert data added 2013-03-25 00:39:38 +04:00
20130324151736_add_type_to_snippets.rb Project snippet moved to separate model 2013-03-24 19:26:49 +04:00
20130324172327_change_project_id_to_null_in_snipepts.rb Snippets feature refactored. Tests now use spinach 2013-03-24 22:31:14 +04:00
20130324203535_add_type_value_for_snippets.rb Migrations to convert data added 2013-03-25 00:39:38 +04:00
20130325173941_add_notification_level_to_user.rb notification level for user 2013-03-26 10:48:07 +02:00
20130326142630_add_index_to_users_authentication_token.rb add db index for authentication_token column in users table 2013-06-14 22:07:09 +05:00
20130403003950_add_last_activity_column_into_project.rb Improve migration AddLastActivityColumnIntoProject to use real last activity date if present 2013-04-09 20:58:47 +03:00
20130404164628_add_notification_level_to_user_project.rb add notification level to UsersProject 2013-04-04 22:11:15 +03:00
20130410175022_remove_wiki_table.rb Remove Wiki and db table since we use gollum now 2013-04-10 22:20:00 +03:00
20130419190306_allow_merges_for_forks.rb Update 20130419190306_allow_merges_for_forks.rb 2013-08-25 21:47:04 +03:00
20130506085413_add_type_to_key.rb migrations for ssh key STI and deploy keys <-> projects relation 2013-05-06 12:27:54 +03:00
20130506090604_create_deploy_keys_projects.rb migrations for ssh key STI and deploy keys <-> projects relation 2013-05-06 12:27:54 +03:00
20130506095501_remove_project_id_from_key.rb Remove deprecated finders 2014-01-19 23:39:56 +04:00
20130522141856_add_more_fields_to_service.rb Add more fields to project service model 2013-05-22 17:21:05 +03:00
20130528184641_add_system_to_notes.rb Link issues from comments and automatically close them 2013-08-25 18:58:41 -04:00
20130611210815_increase_snippet_text_column_size.rb Increase snippet content column size. 2013-06-11 21:11:05 -05:00
20130613165816_add_password_expires_at_to_users.rb Add password_expires_at to users table 2013-06-13 20:01:35 +03:00
20130613173246_add_created_by_id_to_user.rb Force user password change for users created by admin 2013-06-13 21:06:27 +03:00
20130614132337_add_improted_to_project.rb Add imported boolean to project. Prevent shell from creating repo after it was imported 2013-06-14 16:30:48 +03:00
20130617095603_create_users_groups.rb create UsersGroup entity. Modify ability to check group owners instead one owner 2013-06-18 17:47:52 +03:00
20130621195223_add_notification_level_to_user_group.rb Add notification level to group membership 2013-06-21 23:17:20 +03:00
20130622115340_add_more_db_index.rb More db index 2013-06-22 15:01:08 +03:00
20130624162710_add_fingerprint_to_key.rb store and display public key fingerprint 2013-06-24 20:07:21 +03:00
20130804151314_add_st_diff_to_note.rb st_diff field for Note 2013-08-04 19:00:41 +03:00
20130809124851_add_permission_check_to_user.rb Add User#last_credential_check_at 2014-03-11 10:07:22 +02:00
20130812143708_add_import_url_to_project.rb Repository import during project creation often return timeout for medium and large repos. 2013-08-12 18:21:47 +03:00
20130819182730_add_internal_ids_to_issues_and_mr.rb Add iid field to issues and MR 2013-08-19 22:10:21 +03:00
20130821090530_remove_deprecated_tables.rb Drop deprecated tables 2013-08-21 12:08:10 +03:00
20130821090531_add_internal_ids_to_milestones.rb Add iids to milestones. Moved iids logic to separate concern 2013-08-21 12:16:26 +03:00
20130909132950_add_description_to_merge_request.rb Add description to MergeRequest model 2013-09-09 16:32:43 +03:00
20130926081215_change_owner_id_for_group.rb Namespaces.owner_id can be null 2013-09-26 14:48:58 +03:00
20131005191208_add_avatar_to_users.rb avatar upload on profile page 2013-10-09 09:05:09 +02:00
20131009115346_add_confirmable_to_users.rb Enable confirmable and reconfirmable modules for User 2013-10-15 09:56:04 +03:00
20131106151520_remove_default_branch.rb Project#default_branch use repo HEAD instead of DB value now 2013-11-06 18:45:39 +02:00
20131112114325_create_broadcast_messages.rb Broadcast message model + migrations 2013-11-12 13:47:28 +02:00
20131112220935_add_visibility_level_to_projects.rb Adding authenticated public mode (internal). 2013-11-26 22:22:07 -06:00
20131129154016_add_archived_to_projects.rb Archiving old projects; archived projects aren't shown on dashboard 2013-12-16 14:39:14 +01:00
20131130165425_add_color_and_font_to_broadcast_messages.rb Customization and previewing of broadcast messages 2013-12-18 17:43:45 -05:00
20131202192556_add_event_fields_for_web_hook.rb Add new fields to web_hooks table. 2013-12-04 13:37:17 +02:00
20131214224427_add_hide_no_ssh_key_to_users.rb Allow user to hide the message to add an ssh key permanently 2013-12-14 20:21:12 -06:00
20131217102743_add_recipients_to_service.rb Create EmailsOnPushService model 2013-12-17 12:42:40 +02:00
20140116231608_add_website_url_to_users.rb Add website url to user 2014-01-18 19:15:10 +00:00
20140122112253_create_merge_request_diffs.rb Improve db schema for merge request diffs 2014-01-22 15:17:41 +02:00
20140122114406_migrate_mr_diffs.rb Fix merge_request_diffs migrations for postgresql 2014-01-27 18:50:53 +04:00
20140122122549_remove_m_rdiff_fields.rb Fix merge_request_diffs migrations for postgresql 2014-01-27 18:50:53 +04:00
20140125162722_add_avatar_to_projects.rb adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix 2015-01-24 18:51:16 +01:00
20140127170938_add_group_avatars.rb added group avatars 2014-01-28 08:38:00 +01:00
20140209025651_create_emails.rb Add email aliases for users 2014-02-13 22:59:39 -06:00
20140214102325_add_api_key_to_services.rb Add Gemnasium Service for Gitlab 2014-02-21 16:25:22 +01:00
20140304005354_add_index_merge_request_diffs_on_merge_request_id.rb Add index_merge_request_diffs_on_merge_request_id 2014-03-04 10:38:09 +09:00
20140305193308_add_tag_push_hooks_to_project_hook.rb Added tag_push_events to the web_hooks 2014-03-05 20:44:01 +01:00
20140312145357_add_import_status_to_project.rb Add Project#import_status field 2014-03-12 17:14:28 +02:00
20140313092127_migrate_already_imported_projects.rb Add migration for already imported projects 2014-03-13 11:28:41 +02:00
20140407135544_fix_namespaces.rb Add trailing newline to all text files. 2014-06-21 11:20:22 +02:00
20140414131055_change_state_to_allow_empty_merge_request_diffs.rb Fixed some hound notices 2014-04-14 15:24:37 +02:00
20140415124820_limits_to_mysql.rb Adjust MySQL limits for existing installations 2014-04-23 11:07:36 +02:00
20140416074002_add_index_on_iid.rb Migrate invalid rows with missing iids or duplicates 2014-04-24 19:39:33 +02:00
20140416185734_index_on_current_sign_in_at.rb Add db index for active user display. 2014-04-16 21:05:13 +02:00
20140428105831_add_notes_index_updated_at.rb Add an index for Note#updated_at 2014-04-28 13:02:05 +02:00
20140502115131_add_repo_size_to_db.rb Save repository size to projects table 2014-05-02 16:05:08 +03:00
20140502125220_migrate_repo_size.rb Save repository size to projects table 2014-05-02 16:05:08 +03:00
20140611135229_add_position_to_merge_request.rb Add sorting to merge requests on milestone page 2014-06-11 17:11:52 +03:00
20140625115202_create_users_star_projects.rb Add star count, view logic, more tests. 2014-07-17 22:47:16 +02:00
20140729134820_create_labels.rb Label and LabelLink models for implementing own GitLab labels 2014-07-29 17:10:15 +03:00
20140729140420_create_label_links.rb Label and LabelLink models for implementing own GitLab labels 2014-07-29 17:10:15 +03:00
20140729145339_migrate_project_tags.rb Replace project labels with tags to prevent name conflict with GitLab labels 2014-07-29 18:23:18 +03:00
20140729152420_migrate_taggable_labels.rb Fixes #7571 2014-08-27 21:12:37 +01:00
20140730111702_add_index_to_labels.rb Add indicies to labels 2014-07-30 14:25:27 +03:00
20140903115954_migrate_to_new_shell.rb Use create-hooks instead of rewrite-hooks.sh 2014-09-08 10:16:15 +02:00
20140907220153_serialize_service_properties.rb Make services migration more reliable 2015-02-23 17:56:05 -08:00
20140914113604_add_members_table.rb Fix migration and association for new members table 2014-09-14 20:38:57 +03:00
20140914145549_migrate_to_new_members_model.rb Fix STI+polymorphic for Group <-> GroupMember 2014-09-14 21:52:54 +03:00
20140914173417_remove_old_member_tables.rb Fix migration and association for new members table 2014-09-14 20:38:57 +03:00
20141006143943_move_slack_service_to_webhook.rb Prevent another migration from failing. 2015-02-25 22:55:37 +01:00
20141007100818_add_visibility_level_to_snippet.rb Snippets: public/internal/private 2014-10-09 17:09:53 +03:00
20141121133009_add_timestamps_to_members.rb Add missing timestamps to the 'members' table 2014-11-21 15:02:23 +01:00
20141121161704_add_identity_table.rb Remove index only if exists 2014-12-23 11:05:50 +02:00
20141205134006_add_locked_at_to_merge_request.rb Add locked_at to merge request 2014-12-05 15:42:26 +02:00
20141216155758_create_doorkeeper_tables.rb Doorkeeper integration 2014-12-24 15:38:07 +02:00
20141217125223_add_owner_to_application.rb Doorkeeper integration 2014-12-24 15:38:07 +02:00
20141223135007_add_import_data_to_project_table.rb Github Importer 2015-01-10 09:51:43 -08:00
20141226080412_add_developers_can_push_to_protected_branches.rb Add migration for developers can push to protected branches flag. 2014-12-26 09:07:02 +01:00
20150108073740_create_application_settings.rb Init ApplicationSettings resource with defaults from config file 2015-01-08 00:22:50 -08:00
20150116234544_add_home_page_url_for_application_settings.rb Allow to specify home page for non logged-in users 2015-01-16 16:01:15 -08:00
20150116234545_add_gitlab_access_token_to_user.rb an ability to clone project with oauth2 token 2015-01-28 15:57:31 -08:00
20150125163100_add_default_branch_protection_setting.rb Allow configuring protection of the default branch upon first push 2015-01-25 17:09:10 +01:00
20150205211843_add_timestamps_to_identities.rb Add timestamps to identity 2015-02-05 13:23:32 -08:00
20150206181414_add_index_to_created_at.rb Add index on order columns 2015-02-06 10:21:48 -08:00
20150206222854_add_notification_email_to_user.rb Allow notification email to be set separately from primary email. 2015-02-07 23:19:17 +01:00
20150209222013_add_missing_index.rb Add index on order columns for services table 2015-02-09 14:21:52 -08:00
20150211172122_add_template_to_service.rb Add template boolean to services. 2015-02-11 09:24:40 -08:00
20150211174341_allow_null_in_services_project_id.rb Remove not null constraint on project_id in services. 2015-02-11 09:47:21 -08:00
20150213104043_add_twitter_sharing_enabled_to_application_settings.rb Add link to share via twitter to "created project" event. 2015-02-13 12:07:59 +01:00
20150213114800_add_hide_no_password_to_user.rb Allow users that signed up via OAuth to set their password in order to use Git over HTTP(S). 2015-02-13 14:44:42 +01:00
20150213121042_add_password_automatically_set_to_user.rb Allow users that signed up via OAuth to set their password in order to use Git over HTTP(S). 2015-02-13 14:44:42 +01:00
20150217123345_add_bitbucket_access_token_and_secret_to_user.rb Add Bitbucket importer. 2015-02-24 15:07:24 +01:00
20150219004514_add_events_to_services.rb Issue #595: Support Slack notifications upon issue and merge request events 2015-03-03 11:14:31 +01:00
20150223022001_set_missing_last_activity_at.rb No need to block db:rollback for safe migration 2015-02-25 19:51:13 -08:00
20150225065047_add_note_events_to_services.rb Added comment notification events to HipChat and Slack services. 2015-03-06 06:54:00 -08:00
20150301014758_add_restricted_visibility_levels_to_application_settings.rb Move restricted visibility settings to the UI 2015-03-07 13:11:08 -07:00
20150306023106_fix_namespace_duplication.rb remove duplication 2015-03-10 20:09:34 +02:00
20150306023112_add_unique_index_to_namespace.rb remove duplication 2015-03-10 20:09:34 +02:00
20150313012111_create_subscriptions_table.rb tests 2015-03-16 21:38:41 +02:00
20150320234437_add_location_to_user.rb Add location to user profile 2015-03-20 16:52:23 -07:00
20150324133047_remove_periods_at_ends_of_usernames.rb Fix migration SQL. 2015-03-31 23:42:49 +02:00
20150324155957_set_incorrect_assignee_id_to_null.rb Add migration. 2015-03-24 17:00:56 +01:00
20150328132231_add_max_attachment_size_to_application_settings.rb Support configurable attachment size via Application Settings 2015-04-02 00:04:08 -07:00
limits_to_mysql.rb Move the adapter check to the migration 2014-04-23 11:08:51 +02:00