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
e4e7e9c3
Commit
e4e7e9c3
authored
Jun 28, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inform the user of actions taken or not taken
parent
ad12feaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
db/migrate/20170626202753_update_authorized_keys_file.rb
db/migrate/20170626202753_update_authorized_keys_file.rb
+8
-1
No files found.
db/migrate/20170626202753_update_authorized_keys_file.rb
View file @
e4e7e9c3
...
...
@@ -17,6 +17,8 @@ class UpdateAuthorizedKeysFile < ActiveRecord::Migration
def
up
if
authorized_keys_file_in_use_and_stale?
say
'The authorized_keys file is in use, and may be stale. Now bringing it up-to-date in the background...'
# Update nil authorized_keys_enabled to true to ensure that Gitlab::Shell
# key methods work properly for workers running 9.3.0 during the
# migration. If the setting remained nil, the workers would not edit the
...
...
@@ -24,6 +26,8 @@ class UpdateAuthorizedKeysFile < ActiveRecord::Migration
update_nil_setting_to_true
update_authorized_keys_file_since
(
DATETIME_9_3_0_RELEASED
)
else
say
'The authorized_keys file does not need to be updated. Skipping...'
end
end
...
...
@@ -62,7 +66,10 @@ class UpdateAuthorizedKeysFile < ActiveRecord::Migration
# If the column is already fixed, then the migration wasn't run before now.
default_value
=
Gitlab
::
Database
.
postgresql?
?
'true'
:
'1'
!
column_exists?
(
:application_settings
,
:authorized_keys_enabled
,
:boolean
,
default:
default_value
,
null:
false
)
column_has_no_default
=
!
column_exists?
(
:application_settings
,
:authorized_keys_enabled
,
:boolean
,
default:
default_value
,
null:
false
)
say
"This GitLab installation was
#{
'never '
unless
column_has_no_default
}
upgraded to exactly version 9.3.0."
column_has_no_default
end
def
false_negative_warning
...
...
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