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
8130d702
Commit
8130d702
authored
May 18, 2021
by
Hordur Freyr Yngvason
Committed by
Tiger Watson
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backfill clusters_integration_elastic_stack.enabled
parent
af8d6a2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
changelogs/unreleased/backfill-clusters-integration-elatic-stack-enabled.yml
...ed/backfill-clusters-integration-elatic-stack-enabled.yml
+5
-0
db/post_migrate/20210518001450_backfill_clusters_integration_elastic_stack_enabled.rb
...50_backfill_clusters_integration_elastic_stack_enabled.rb
+34
-0
db/schema_migrations/20210518001450
db/schema_migrations/20210518001450
+1
-0
No files found.
changelogs/unreleased/backfill-clusters-integration-elatic-stack-enabled.yml
0 → 100644
View file @
8130d702
---
title
:
Backfill clusters_integration_elastic_stack.enabled
merge_request
:
61521
author
:
type
:
changed
db/post_migrate/20210518001450_backfill_clusters_integration_elastic_stack_enabled.rb
0 → 100644
View file @
8130d702
# frozen_string_literal: true
class
BackfillClustersIntegrationElasticStackEnabled
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
def
up
ApplicationRecord
.
connection
.
execute
(
<<~
SQL
.
squish
)
INSERT INTO clusters_integration_elasticstack(
cluster_id,
enabled,
chart_version,
created_at,
updated_at
)
SELECT
cluster_id,
true,
version,
TIMEZONE('UTC', NOW()),
TIMEZONE('UTC', NOW())
FROM clusters_applications_elastic_stacks
WHERE status IN (3, 11)
ON CONFLICT(cluster_id) DO UPDATE SET
enabled = true,
updated_at = TIMEZONE('UTC', NOW())
SQL
end
def
down
# Irreversible
end
end
db/schema_migrations/20210518001450
0 → 100644
View file @
8130d702
212a2db8b1183eb4ae313eacae7d54f2bec26c5ea3f961981d34e57ca1420ad9
\ No newline at end of file
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