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
7fb3dcc9
Commit
7fb3dcc9
authored
Oct 07, 2021
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete column for DevOps analytics
Changelog: removed
parent
0e0f4d3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb
...007093340_remove_analytics_snapshots_segment_id_column.rb
+17
-0
db/schema_migrations/20211007093340
db/schema_migrations/20211007093340
+1
-0
db/structure.sql
db/structure.sql
+0
-8
No files found.
db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb
0 → 100644
View file @
7fb3dcc9
# frozen_string_literal: true
class
RemoveAnalyticsSnapshotsSegmentIdColumn
<
Gitlab
::
Database
::
Migration
[
1.0
]
disable_ddl_transaction!
def
up
remove_column
:analytics_devops_adoption_snapshots
,
:segment_id
end
def
down
add_column
:analytics_devops_adoption_snapshots
,
:segment_id
,
:bigint
,
after: :id
add_concurrent_foreign_key
:analytics_devops_adoption_snapshots
,
:analytics_devops_adoption_segments
,
column: :segment_id
,
name:
'fk_rails_25da9a92c0'
,
on_delete: :cascade
add_concurrent_index
:analytics_devops_adoption_snapshots
,
[
:segment_id
,
:end_time
],
name: :index_on_snapshots_segment_id_end_time
add_concurrent_index
:analytics_devops_adoption_snapshots
,
[
:segment_id
,
:recorded_at
],
name: :index_on_snapshots_segment_id_recorded_at
end
end
db/schema_migrations/20211007093340
0 → 100644
View file @
7fb3dcc9
fbb3092caba901ddd5a740bb67a91d1c8a4c458651afaf02704399844acbd2b8
\ No newline at end of file
db/structure.sql
View file @
7fb3dcc9
...
...
@@ -9912,7 +9912,6 @@ ALTER SEQUENCE analytics_devops_adoption_segments_id_seq OWNED BY analytics_devo
CREATE TABLE analytics_devops_adoption_snapshots (
id bigint NOT NULL,
segment_id bigint,
recorded_at timestamp with time zone NOT NULL,
issue_opened boolean NOT NULL,
merge_request_opened boolean NOT NULL,
...
...
@@ -25914,10 +25913,6 @@ CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path):
CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text));
CREATE INDEX index_on_snapshots_segment_id_end_time ON analytics_devops_adoption_snapshots USING btree (segment_id, end_time);
CREATE INDEX index_on_snapshots_segment_id_recorded_at ON analytics_devops_adoption_snapshots USING btree (segment_id, recorded_at);
CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text));
CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text));
...
...
@@ -28604,9 +28599,6 @@ ALTER TABLE ONLY incident_management_oncall_rotations
ALTER TABLE ONLY ci_unit_test_failures
ADD CONSTRAINT fk_rails_259da3e79c FOREIGN KEY (unit_test_id) REFERENCES ci_unit_tests(id) ON DELETE CASCADE;
ALTER TABLE ONLY analytics_devops_adoption_snapshots
ADD CONSTRAINT fk_rails_25da9a92c0 FOREIGN KEY (segment_id) REFERENCES analytics_devops_adoption_segments(id) ON DELETE CASCADE;
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT fk_rails_25e9fc2d5d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
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