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
a6d63e67
Commit
a6d63e67
authored
Jul 07, 2020
by
Erick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old daily report results table
Cleaning up this old unused table.
parent
09773394
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
35 deletions
+52
-35
changelogs/unreleased/eb-drop-old-daily-report-results-table.yml
...ogs/unreleased/eb-drop-old-daily-report-results-table.yml
+5
-0
db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb
...21557_remove_f_keys_from_ci_daily_report_results_table.rb
+21
-0
db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb
...rate/20200706154619_drop_ci_daily_report_results_table.rb
+24
-0
db/structure.sql
db/structure.sql
+2
-35
No files found.
changelogs/unreleased/eb-drop-old-daily-report-results-table.yml
0 → 100644
View file @
a6d63e67
---
title
:
Add migration to drop unused daily report results table
merge_request
:
36102
author
:
type
:
other
db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb
0 → 100644
View file @
a6d63e67
# frozen_string_literal: true
class
RemoveFKeysFromCiDailyReportResultsTable
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
with_lock_retries
do
remove_foreign_key_if_exists
:ci_daily_report_results
,
:projects
remove_foreign_key_if_exists
:ci_daily_report_results
,
:ci_pipelines
end
end
def
down
add_concurrent_foreign_key
:ci_daily_report_results
,
:projects
,
column: :project_id
,
on_delete: :cascade
add_concurrent_foreign_key
:ci_daily_report_results
,
:ci_pipelines
,
column: :last_pipeline_id
,
on_delete: :cascade
end
end
db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb
0 → 100644
View file @
a6d63e67
# frozen_string_literal: true
class
DropCiDailyReportResultsTable
<
ActiveRecord
::
Migration
[
6.0
]
DOWNTIME
=
false
def
up
drop_table
:ci_daily_report_results
end
def
down
create_table
:ci_daily_report_results
do
|
t
|
t
.
date
:date
,
null:
false
t
.
bigint
:project_id
,
null:
false
t
.
bigint
:last_pipeline_id
,
null:
false
t
.
float
:value
,
null:
false
t
.
integer
:param_type
,
limit:
8
,
null:
false
t
.
string
:ref_path
,
null:
false
t
.
string
:title
,
null:
false
t
.
index
:last_pipeline_id
t
.
index
[
:project_id
,
:ref_path
,
:param_type
,
:date
,
:title
],
name:
'index_daily_report_results_unique_columns'
,
unique:
true
end
end
end
db/structure.sql
View file @
a6d63e67
...
...
@@ -9816,26 +9816,6 @@ CREATE SEQUENCE public.ci_daily_build_group_report_results_id_seq
ALTER
SEQUENCE
public
.
ci_daily_build_group_report_results_id_seq
OWNED
BY
public
.
ci_daily_build_group_report_results
.
id
;
CREATE
TABLE
public
.
ci_daily_report_results
(
id
bigint
NOT
NULL
,
date
date
NOT
NULL
,
project_id
bigint
NOT
NULL
,
last_pipeline_id
bigint
NOT
NULL
,
value
double
precision
NOT
NULL
,
param_type
bigint
NOT
NULL
,
ref_path
character
varying
NOT
NULL
,
title
character
varying
NOT
NULL
);
CREATE
SEQUENCE
public
.
ci_daily_report_results_id_seq
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
SEQUENCE
public
.
ci_daily_report_results_id_seq
OWNED
BY
public
.
ci_daily_report_results
.
id
;
CREATE
TABLE
public
.
ci_freeze_periods
(
id
bigint
NOT
NULL
,
project_id
bigint
NOT
NULL
,
...
...
@@ -16406,8 +16386,6 @@ ALTER TABLE ONLY public.ci_builds_runner_session ALTER COLUMN id SET DEFAULT nex
ALTER
TABLE
ONLY
public
.
ci_daily_build_group_report_results
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'public.ci_daily_build_group_report_results_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
public
.
ci_daily_report_results
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'public.ci_daily_report_results_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
public
.
ci_freeze_periods
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'public.ci_freeze_periods_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
public
.
ci_group_variables
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'public.ci_group_variables_id_seq'
::
regclass
);
...
...
@@ -17318,9 +17296,6 @@ ALTER TABLE ONLY public.ci_builds_runner_session
ALTER
TABLE
ONLY
public
.
ci_daily_build_group_report_results
ADD
CONSTRAINT
ci_daily_build_group_report_results_pkey
PRIMARY
KEY
(
id
);
ALTER
TABLE
ONLY
public
.
ci_daily_report_results
ADD
CONSTRAINT
ci_daily_report_results_pkey
PRIMARY
KEY
(
id
);
ALTER
TABLE
ONLY
public
.
ci_freeze_periods
ADD
CONSTRAINT
ci_freeze_periods_pkey
PRIMARY
KEY
(
id
);
...
...
@@ -18740,8 +18715,6 @@ CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON public.ci_buil
CREATE
INDEX
index_ci_daily_build_group_report_results_on_last_pipeline_id
ON
public
.
ci_daily_build_group_report_results
USING
btree
(
last_pipeline_id
);
CREATE
INDEX
index_ci_daily_report_results_on_last_pipeline_id
ON
public
.
ci_daily_report_results
USING
btree
(
last_pipeline_id
);
CREATE
INDEX
index_ci_freeze_periods_on_project_id
ON
public
.
ci_freeze_periods
USING
btree
(
project_id
);
CREATE
UNIQUE
INDEX
index_ci_group_variables_on_group_id_and_key
ON
public
.
ci_group_variables
USING
btree
(
group_id
,
key
);
...
...
@@ -18958,8 +18931,6 @@ CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON public.custom
CREATE
UNIQUE
INDEX
index_daily_build_group_report_results_unique_columns
ON
public
.
ci_daily_build_group_report_results
USING
btree
(
project_id
,
ref_path
,
date
,
group_name
);
CREATE
UNIQUE
INDEX
index_daily_report_results_unique_columns
ON
public
.
ci_daily_report_results
USING
btree
(
project_id
,
ref_path
,
param_type
,
date
,
title
);
CREATE
INDEX
index_dependency_proxy_blobs_on_group_id_and_file_name
ON
public
.
dependency_proxy_blobs
USING
btree
(
group_id
,
file_name
);
CREATE
INDEX
index_dependency_proxy_group_settings_on_group_id
ON
public
.
dependency_proxy_group_settings
USING
btree
(
group_id
);
...
...
@@ -22317,9 +22288,6 @@ ALTER TABLE ONLY public.gpg_signatures
ALTER
TABLE
ONLY
public
.
board_group_recent_visits
ADD
CONSTRAINT
fk_rails_ca04c38720
FOREIGN
KEY
(
board_id
)
REFERENCES
public
.
boards
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
public
.
ci_daily_report_results
ADD
CONSTRAINT
fk_rails_cc5caec7d9
FOREIGN
KEY
(
last_pipeline_id
)
REFERENCES
public
.
ci_pipelines
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
public
.
issues_self_managed_prometheus_alert_events
ADD
CONSTRAINT
fk_rails_cc5d88bbb0
FOREIGN
KEY
(
issue_id
)
REFERENCES
public
.
issues
(
id
)
ON
DELETE
CASCADE
;
...
...
@@ -22440,9 +22408,6 @@ ALTER TABLE ONLY public.alert_management_alert_user_mentions
ALTER
TABLE
ONLY
public
.
snippet_statistics
ADD
CONSTRAINT
fk_rails_ebc283ccf1
FOREIGN
KEY
(
snippet_id
)
REFERENCES
public
.
snippets
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
public
.
ci_daily_report_results
ADD
CONSTRAINT
fk_rails_ebc2931b90
FOREIGN
KEY
(
project_id
)
REFERENCES
public
.
projects
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
public
.
cluster_providers_aws
ADD
CONSTRAINT
fk_rails_ed1fdfaeb2
FOREIGN
KEY
(
created_by_user_id
)
REFERENCES
public
.
users
(
id
)
ON
DELETE
SET
NULL
;
...
...
@@ -23642,10 +23607,12 @@ COPY "schema_migrations" (version) FROM STDIN;
20200630110826
20200701093859
20200702123805
20200703121557
20200703154822
20200704143633
20200704161600
20200706005325
20200706154619
20200706170536
20200707071941
20200707094341
...
...
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