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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
8af788e0
Commit
8af788e0
authored
Mar 30, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable invalid service templates (again)
parent
61854294
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
changelogs/unreleased/30024-owner-can-t-initialize-git-repo-for-new-project-in-group.yml
...er-can-t-initialize-git-repo-for-new-project-in-group.yml
+4
-0
db/migrate/20170330141723_disable_invalid_service_templates2.rb
...rate/20170330141723_disable_invalid_service_templates2.rb
+18
-0
No files found.
changelogs/unreleased/30024-owner-can-t-initialize-git-repo-for-new-project-in-group.yml
0 → 100644
View file @
8af788e0
---
title
:
Disable invalid service templates
merge_request
:
author
:
db/migrate/20170330141723_disable_invalid_service_templates2.rb
0 → 100644
View file @
8af788e0
# This is the same as DisableInvalidServiceTemplates. Later migrations may have
# inadventently enabled some invalid templates again.
#
class
DisableInvalidServiceTemplates2
<
ActiveRecord
::
Migration
DOWNTIME
=
false
unless
defined?
(
Service
)
class
Service
<
ActiveRecord
::
Base
self
.
inheritance_column
=
nil
end
end
def
up
Service
.
where
(
template:
true
,
active:
true
).
each
do
|
template
|
template
.
update
(
active:
false
)
unless
template
.
valid?
end
end
end
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