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
Boxiang Sun
gitlab-ce
Commits
e8213b34
Commit
e8213b34
authored
Feb 15, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_25112' into 'master'
Disable invalid service templates Closes #25112 See merge request !8850
parents
88132258
de12a69a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
changelogs/unreleased/issue_25112.yml
changelogs/unreleased/issue_25112.yml
+4
-0
db/post_migrate/20170211073944_disable_invalid_service_templates.rb
...grate/20170211073944_disable_invalid_service_templates.rb
+15
-0
db/schema.rb
db/schema.rb
+1
-1
No files found.
changelogs/unreleased/issue_25112.yml
0 → 100644
View file @
e8213b34
---
title
:
Disable invalid service templates
merge_request
:
author
:
db/post_migrate/20170211073944_disable_invalid_service_templates.rb
0 → 100644
View file @
e8213b34
class
DisableInvalidServiceTemplates
<
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
db/schema.rb
View file @
e8213b34
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017021
0075922
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017021
1073944
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
...
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