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
Léo-Paul Géneau
gitlab-ce
Commits
de12a69a
Commit
de12a69a
authored
Jan 27, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable invalid service templates
parent
99df355e
Changes
3
Hide 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 @
de12a69a
---
title
:
Disable invalid service templates
merge_request
:
author
:
db/post_migrate/20170211073944_disable_invalid_service_templates.rb
0 → 100644
View file @
de12a69a
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 @
de12a69a
...
...
@@ -11,7 +11,7 @@
#
# 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
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