Commit Graph

8 Commits

Author SHA1 Message Date
Jan Provaznik 0fc9f9d3e7 Add version 4.2 to all existing migrations
DB schema generated by a migration may look different in
rails 4 and 5 (because rails 5 may use different default values).
For this reason it's important to explicitly set for which rails
version a migration was written for.

See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
2018-11-22 13:18:28 +01:00
Gabriel Mazetto f21e655b61 disable_statement_timeout doesn't require any argument anymore
it will decide the method for disable statement_timeout upon
per transaction or per session, based on how it's called.

When calling with a block, block will be executed and it will use
session based statement_timeout, otherwise will default to existing
behavior.
2018-08-11 04:15:59 +02:00
Gabriel Mazetto 119c49172f Fix specs to use `disable_statement_timeout` correctly 2018-08-10 20:40:00 +02:00
Sean McGivern d8be981466 Prevent update_column_in_batches on large tables
add_column_with_default is implemented in terms of update_column_in_batches, but
update_column_in_batches can be used independently. Neither of these should be
used on the specified large tables, because they will cause issues on large
instances like GitLab.com.

This also ignores the cop for all existing migrations, renaming
AddColumnWithDefaultToLargeTable where appropriate.
2017-11-17 16:56:50 +00:00
Grzegorz Bizon 5331a49d0b Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helper
* master: (56 commits)
  File view buttons
  Don't reset the session when the example failed, because we need capybara-screenshot to have access to it
  Resolve "MR comment + system note highlight don't have the same width"
  Add feature spec for dashboard state filter tabs
  Wording of Mysql support.
  a new feature checklist and more elaborate documentation requirements
  Filter archived project in API v3 only if param present
  Revert to using links instead of buttons in Issuable Index tabs.
  Do not run the codeclimate job on docs-only changes
  Only show gray footer space if environment actions exist
  Migrate Gitlab::Git::Blob.find to Gitaly
  Backport filtered search lazy token consistent state fix
  Add a comment explaining how the branch clean up happens
  Fix Github::Representation::PullRequest#source_branch_exists?
  Add CHANGELOG
  Fix GitHub importer performance on branch existence check
  Rebuild the dynamic path before validating it
  Rename stage ref migration specs to match a class name
  Enable Style/DotPosition Rubocop 👮
  Revert "Merge branch 'winh-merge-request-related-issues' into 'master'"
  ...

Conflicts:
	db/post_migrate/20170526185921_migrate_build_stage_reference.rb
2017-06-22 12:37:38 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Grzegorz Bizon 3fd4a37d58 Disable transactions in migrations that should not use it 2017-06-21 14:35:06 +02:00
Felipe Artur 2ccee7161a Small code improvements and add migration spec 2017-05-08 18:43:53 -03:00