Commit graph

6 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
Stan Hu
edb82271ae Fix PG::UniqueViolation external_email migration
Missing parens prevented this migration from working in some cases.

Closes #38246
2017-09-25 06:17:48 -04:00
Stan Hu
2e564ddfc7 Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration
`email_provider` by default is NULL, and if a user had not logged the
value would remain NULL. Upgrading to GitLab 10.0 would lead to a
PG::UniqueViolation because the post-deploy migration would attempt
to reinsert the entry because the NULL comparison between
`users.email_provider` and `user_synced_attributes_metadata.email_provider`
would never match.

Closes #38246
2017-09-22 22:45:25 -04:00
Robert Speicher
652a9324a1 Revert "Merge branch 'rs-remove-bad-foreground-migration' into 'master'"
This reverts merge request !14240
2017-09-13 15:09:51 +00:00
Robert Speicher
faefeac880 Remove db/migrate/20170828135939_migrate_user_external_mail_data.rb
This file is a duplicate of a post-deploy migration and appears to have
been left in by mistake.

Looping through the Users table in a foreground migration would've been
a bad idea.

[ci skip]
2017-09-12 18:23:07 -04:00
Alexander Keramidas
4df54f2607 Profile updates from providers 2017-09-06 16:38:52 +03:00