Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8fdba5fa
Commit
8fdba5fa
authored
Jun 06, 2017
by
Robin Bobbitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync email address from specified omniauth provider - db changes
parent
0bcb1d35
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
...170531202042_rename_users_ldap_email_to_external_email.rb
+15
-0
db/migrate/20170603200744_add_email_provider_to_users.rb
db/migrate/20170603200744_add_email_provider_to_users.rb
+9
-0
db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
...migrate/20170531203055_cleanup_users_ldap_email_rename.rb
+15
-0
db/schema.rb
db/schema.rb
+3
-2
No files found.
db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
0 → 100644
View file @
8fdba5fa
class
RenameUsersLdapEmailToExternalEmail
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
rename_column_concurrently
:users
,
:ldap_email
,
:external_email
end
def
down
cleanup_concurrent_column_rename
:users
,
:external_email
,
:ldap_email
end
end
db/migrate/20170603200744_add_email_provider_to_users.rb
0 → 100644
View file @
8fdba5fa
class
AddEmailProviderToUsers
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
add_column
:users
,
:email_provider
,
:string
end
end
db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
0 → 100644
View file @
8fdba5fa
class
CleanupUsersLdapEmailRename
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
cleanup_concurrent_column_rename
:users
,
:ldap_email
,
:external_email
end
def
down
rename_column_concurrently
:users
,
:external_email
,
:ldap_email
end
end
db/schema.rb
View file @
8fdba5fa
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20170
526185921
)
do
ActiveRecord
::
Schema
.
define
(
version:
20170
603200744
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -1415,7 +1415,6 @@ ActiveRecord::Schema.define(version: 20170526185921) do
t
.
boolean
"hide_project_limit"
,
default:
false
t
.
string
"unlock_token"
t
.
datetime
"otp_grace_period_started_at"
t
.
boolean
"ldap_email"
,
default:
false
,
null:
false
t
.
boolean
"external"
,
default:
false
t
.
string
"incoming_email_token"
t
.
string
"organization"
...
...
@@ -1426,6 +1425,8 @@ ActiveRecord::Schema.define(version: 20170526185921) do
t
.
boolean
"notified_of_own_activity"
t
.
string
"preferred_language"
t
.
string
"rss_token"
t
.
boolean
"external_email"
,
default:
false
,
null:
false
t
.
string
"email_provider"
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment