BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
issue_25112.yml
changelogs/unreleased/issue_25112.yml
+4
-0
20170211073944_disable_invalid_service_templates.rb
...grate/20170211073944_disable_invalid_service_templates.rb
+15
-0
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