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
a68c3b15
Commit
a68c3b15
authored
Apr 27, 2021
by
Krasimir Angelov
Committed by
Andreas Brandl
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize conversion of ci_builds_runner_session.build_id to bigint
See
https://gitlab.com/gitlab-org/gitlab/-/issues/328444
.
parent
59d74b5c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
1 deletion
+65
-1
app/models/ci/build_runner_session.rb
app/models/ci/build_runner_session.rb
+3
-0
changelogs/unreleased/328444-convert-ci-builds-runner-session-build-id-to-bigint.yml
...4-convert-ci-builds-runner-session-build-id-to-bigint.yml
+5
-0
db/migrate/20210427084924_initialize_conversion_of_ci_builds_runner_session_to_bigint.rb
...alize_conversion_of_ci_builds_runner_session_to_bigint.rb
+16
-0
db/post_migrate/20210427085020_backfill_ci_builds_runner_session_for_bigint_conversion.rb
...ackfill_ci_builds_runner_session_for_bigint_conversion.rb
+26
-0
db/schema_migrations/20210427084924
db/schema_migrations/20210427084924
+1
-0
db/schema_migrations/20210427085020
db/schema_migrations/20210427085020
+1
-0
db/structure.sql
db/structure.sql
+13
-1
No files found.
app/models/ci/build_runner_session.rb
View file @
a68c3b15
...
@@ -5,6 +5,9 @@ module Ci
...
@@ -5,6 +5,9 @@ module Ci
# Data will be removed after transitioning from running to any state.
# Data will be removed after transitioning from running to any state.
class
BuildRunnerSession
<
ApplicationRecord
class
BuildRunnerSession
<
ApplicationRecord
extend
Gitlab
::
Ci
::
Model
extend
Gitlab
::
Ci
::
Model
include
IgnorableColumns
ignore_columns
:build_id_convert_to_bigint
,
remove_with:
'14.1'
,
remove_after:
'2021-07-22'
TERMINAL_SUBPROTOCOL
=
'terminal.gitlab.com'
TERMINAL_SUBPROTOCOL
=
'terminal.gitlab.com'
DEFAULT_SERVICE_NAME
=
'build'
DEFAULT_SERVICE_NAME
=
'build'
...
...
changelogs/unreleased/328444-convert-ci-builds-runner-session-build-id-to-bigint.yml
0 → 100644
View file @
a68c3b15
---
title
:
Initialize conversion of ci_builds_runner_session.build_id to bigint
merge_request
:
60366
author
:
type
:
other
db/migrate/20210427084924_initialize_conversion_of_ci_builds_runner_session_to_bigint.rb
0 → 100644
View file @
a68c3b15
# frozen_string_literal: true
class
InitializeConversionOfCiBuildsRunnerSessionToBigint
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
TABLE
=
:ci_builds_runner_session
COLUMNS
=
%i(build_id)
def
up
initialize_conversion_of_integer_to_bigint
(
TABLE
,
COLUMNS
)
end
def
down
revert_initialize_conversion_of_integer_to_bigint
(
TABLE
,
COLUMNS
)
end
end
db/post_migrate/20210427085020_backfill_ci_builds_runner_session_for_bigint_conversion.rb
0 → 100644
View file @
a68c3b15
# frozen_string_literal: true
class
BackfillCiBuildsRunnerSessionForBigintConversion
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
TABLE
=
:ci_builds_runner_session
COLUMNS
=
%i(build_id)
def
up
return
unless
should_run?
backfill_conversion_of_integer_to_bigint
(
TABLE
,
COLUMNS
)
end
def
down
return
unless
should_run?
revert_backfill_conversion_of_integer_to_bigint
(
TABLE
,
COLUMNS
)
end
private
def
should_run?
Gitlab
.
dev_or_test_env?
||
Gitlab
.
com?
end
end
db/schema_migrations/20210427084924
0 → 100644
View file @
a68c3b15
a2fcf3576de4ee5afdab8d07ffc6c2c8f96d6cc85c332f6ab69f2936bf9e58ae
\ No newline at end of file
db/schema_migrations/20210427085020
0 → 100644
View file @
a68c3b15
2e30910d106dd6805f42ffc226d9008b826fa88eaec7091960e11db850b714c4
\ No newline at end of file
db/structure.sql
View file @
a68c3b15
...
@@ -125,6 +125,15 @@ BEGIN
...
@@ -125,6 +125,15 @@ BEGIN
END;
END;
$$;
$$;
CREATE FUNCTION trigger_51ab7cef8934() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW."build_id_convert_to_bigint" := NEW."build_id";
RETURN NEW;
END;
$$;
CREATE FUNCTION trigger_69523443cc10() RETURNS trigger
CREATE FUNCTION trigger_69523443cc10() RETURNS trigger
LANGUAGE plpgsql
LANGUAGE plpgsql
AS $$
AS $$
...
@@ -10486,7 +10495,8 @@ CREATE TABLE ci_builds_runner_session (
...
@@ -10486,7 +10495,8 @@ CREATE TABLE ci_builds_runner_session (
build_id integer NOT NULL,
build_id integer NOT NULL,
url character varying NOT NULL,
url character varying NOT NULL,
certificate character varying,
certificate character varying,
"authorization" character varying
"authorization" character varying,
build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
);
);
CREATE SEQUENCE ci_builds_runner_session_id_seq
CREATE SEQUENCE ci_builds_runner_session_id_seq
...
@@ -24768,6 +24778,8 @@ CREATE TRIGGER trigger_21e7a2602957 BEFORE INSERT OR UPDATE ON ci_build_needs FO
...
@@ -24768,6 +24778,8 @@ CREATE TRIGGER trigger_21e7a2602957 BEFORE INSERT OR UPDATE ON ci_build_needs FO
CREATE TRIGGER trigger_3f6129be01d2 BEFORE INSERT OR UPDATE ON ci_builds FOR EACH ROW EXECUTE PROCEDURE trigger_3f6129be01d2();
CREATE TRIGGER trigger_3f6129be01d2 BEFORE INSERT OR UPDATE ON ci_builds FOR EACH ROW EXECUTE PROCEDURE trigger_3f6129be01d2();
CREATE TRIGGER trigger_51ab7cef8934 BEFORE INSERT OR UPDATE ON ci_builds_runner_session FOR EACH ROW EXECUTE PROCEDURE trigger_51ab7cef8934();
CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE PROCEDURE trigger_69523443cc10();
CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE PROCEDURE trigger_69523443cc10();
CREATE TRIGGER trigger_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE PROCEDURE trigger_8485e97c00e3();
CREATE TRIGGER trigger_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE PROCEDURE trigger_8485e97c00e3();
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